Fix test code lenses #5149
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- release/* | |
pull_request: | |
merge_group: | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: ${{ github.head_ref != 'main' }} | |
jobs: | |
build-test: | |
name: build tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: [email protected] | |
- name: nextest archive | |
run: cargo nextest archive --workspace --all-features --cargo-profile ci --archive-file 'nextest-archive.tar.zst' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: nextest-archive | |
path: nextest-archive.tar.zst | |
test: | |
name: test ${{ matrix.partition }}/4 | |
runs-on: ubuntu-latest | |
needs: | |
- build-test | |
strategy: | |
fail-fast: false | |
matrix: | |
partition: [1, 2, 3, 4] | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: software-mansion/setup-scarb@v1 | |
with: | |
cache: false | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: [email protected] | |
- uses: actions/download-artifact@v5 | |
with: | |
name: nextest-archive | |
- name: nextest partition ${{ matrix.partition }}/4 | |
run: cargo nextest run --partition 'count:${{ matrix.partition }}/4' --archive-file 'nextest-archive.tar.zst' | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo fmt --check | |
- run: cargo lint | |
env: | |
# Make sure CI fails on all warnings, including Clippy lints. | |
RUSTFLAGS: "-Dwarnings" | |
- run: cargo docs | |
env: | |
# Make sure CI fails on all warnings, including Clippy lints. | |
RUSTDOCFLAGS: "-Dwarnings" | |
- uses: taiki-e/install-action@cargo-machete | |
- run: cargo machete |