| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- name: Unit tests
- on:
- push:
- branches: [ main ]
- paths:
- - '.github/workflows/unit-tests.yml'
- - 'src/**'
- - 'Cargo.*'
- - build.rs
- pull_request:
- branches: [ main ]
- paths:
- - '.github/workflows/unit-tests.yml'
- - 'src/**'
- - 'Cargo.*'
- - build.rs
- env:
- CARGO_TERM_COLOR: always
- jobs:
- unit-tests:
- runs-on: ${{ matrix.os }}
- continue-on-error: ${{ matrix.rust == 'nightly' }}
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
- rust: [1.70.0, stable, beta, nightly]
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Install Rust toolchain
- uses: dtolnay/rust-toolchain@v1
- with:
- toolchain: ${{ matrix.rust }}
- - name: Install cargo-hack
- uses: nick-fields/retry@v2
- with:
- timeout_minutes: 5
- max_attempts: 5
- command: cargo install cargo-hack
- - name: Run unit tests
- run: cargo hack test
- - name: Run clippy lints
- run: cargo clippy -- -D warnings
|