| # Build, test and check the code against the linter and clippy |
| name: Build, Test, Format and Clippy |
| |
| on: |
| push: |
| branches: [ main ] |
| pull_request: |
| branches: [ main ] |
| |
| env: |
| CARGO_TERM_COLOR: always |
| |
| jobs: |
| build_and_test: |
| runs-on: ${{ matrix.os }} |
| strategy: |
| matrix: |
| os: [macos-latest, ubuntu-latest, windows-latest] |
| steps: |
| - uses: actions/checkout@v3 |
| - name: Install Rust 1.67.1 |
| uses: actions-rs/toolchain@v1 |
| with: |
| toolchain: 1.67.1 |
| override: true |
| components: rustfmt, clippy |
| - name: Build |
| run: cargo build |
| - name: Test |
| run: cargo test -- --skip uci_packets |
| - name: Fmt |
| run: cargo fmt --check --quiet |
| - name: Clippy |
| run: cargo clippy --no-deps -- --deny warnings |