feature: implement inner attributes capability #410
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| schedule: | |
| - cron: '0 0 1 * *' | |
| name: Continuous integration | |
| jobs: | |
| test: | |
| name: Test suite | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust: | |
| - stable | |
| - beta | |
| - nightly | |
| - 1.68.2 | |
| steps: | |
| - uses: actions/checkout@v3.5.0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2.2.1 | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| if: ${{ matrix.rust == 'nightly' }} | |
| - name: Clippy | |
| run: cargo clippy | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| continue-on-error: ${{ matrix.rust == 'nightly' || matrix.rust == 'beta' }} | |
| - name: Install "build all features" | |
| run: cargo install cargo-all-features --version 1.10.0 --force --locked | |
| - name: Build all features | |
| run: cargo build-all-features | |
| - name: Test all features | |
| run: cargo test-all-features -- -- --nocapture | |
| env: | |
| RUST_TEST_THREADS: 3 # So the parallel tests have enough threads | |
| RUST_LOG: debug | |
| multi-os-testing: | |
| name: Test suite | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| - windows-latest | |
| - macos-latest | |
| steps: | |
| - uses: actions/checkout@v3.5.0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@v2.2.1 | |
| - name: Build and test | |
| run: cargo test --all-features -- --nocapture | |
| env: | |
| RUST_TEST_THREADS: 3 # So the parallel tests have enough threads | |
| RUST_LOG: debug | |
| minimal-versions: | |
| name: minimal versions check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3.5.0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: nightly | |
| - name: Remove lock | |
| run: rm Cargo.lock | |
| - run: cargo build -Z minimal-versions | |
| dependency-updates: | |
| name: dependency updates | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3.5.0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Update packages | |
| run: cargo update | |
| - name: Build and test | |
| run: cargo test --all-features -- --nocapture | |
| env: | |
| RUST_TEST_THREADS: 3 # So the parallel tests have enough threads | |
| RUST_LOG: debug | |
| # As per https://github.com/dtolnay/cargo-docs-rs?tab=readme-ov-file#example | |
| doc: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTDOCFLAGS: -Dwarnings | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - uses: dtolnay/install@cargo-docs-rs | |
| - run: cargo docs-rs -p serial_test | |
| - run: cargo docs-rs -p serial_test_derive |