66 - main
77 pull_request :
88
9+ env :
10+ RUSTFLAGS : -Dwarnings
11+
912concurrency :
1013 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1114 cancel-in-progress : true
@@ -15,81 +18,55 @@ jobs:
1518 name : Lint (rustfmt + clippy)
1619 runs-on : ubuntu-latest
1720 steps :
18- - name : Checkout
19- uses : actions/checkout@v4
20- - name : Install Rust
21- uses : dtolnay/rust-toolchain@nightly
22- with :
23- toolchain : nightly
24- components : clippy, rustfmt
25- - name : Run lint
26- run : make lint.rust
21+ - uses : actions/checkout@v4
22+
23+ - run : rustup toolchain install nightly --profile minimal --component rustfmt --component clippy --no-self-update
24+
25+ - run : cargo fmt --all -- --check
26+ - run : cargo clippy --all-features --workspace --tests --examples -- -D clippy::all
2727
2828 lint-python :
2929 name : Lint Python (ruff, mypy)
3030 runs-on : ubuntu-latest
3131 steps :
32- - name : Checkout
33- uses : actions/checkout@v4
34- - uses : actions/setup-python@v3
35- - name : Set up venv
36- run : make ci.setup_venv
37- - name : Build and run lint
38- run : |
32+ - uses : actions/checkout@v4
33+
34+ - uses : actions/setup-python@v5
35+ - run : make ci.setup_venv
36+
37+ - run : |
3938 maturin develop
4039 make lint.python
4140
42- test :
43- name : Test
41+ doctest :
42+ name : Documentation (and Tests)
4443 runs-on : ubuntu-latest
45- strategy :
46- fail-fast : false
44+ env :
45+ RUSTDOCFLAGS : -Dwarnings
4746 steps :
48- - name : Checkout
49- uses : actions/checkout@v4
50- - name : Install Rust
51- uses : dtolnay/rust-toolchain@nightly
52- with :
53- toolchain : nightly
54- - name : Run Rust tests
55- run : |
56- cargo test
47+ - uses : actions/checkout@v4
5748
58- - uses : actions/setup-python@v3
59- - name : Set up venv
60- run : make ci.setup_venv
61- - name : Run Python tests
62- run : |
63- maturin develop
64- pytest
65-
66- # This job runs tests, generates coverage data, and generates JUnit test
67- # results in a single test invocation and then uploads it all to Codecov.
68- # However, it doesn't print test results to stdout. If Codecov's failed test
69- # reporting is solid and we never need to see the results in the CI logs, we
70- # can delete the "normal" test step and just use this.
71- test-for-codecov :
72- name : Test (Upload to Codecov)
49+ - run : rustup toolchain install nightly --profile minimal --no-self-update
50+
51+ - run : cargo test --workspace --all-features --doc
52+ - run : cargo doc --workspace --all-features --document-private-items --no-deps
53+
54+ test :
55+ name : Test
7356 runs-on : ubuntu-latest
74- strategy :
75- fail-fast : false
7657 steps :
77- - name : Checkout
78- uses : actions/checkout@v4
79- - name : Install Rust
80- uses : dtolnay/rust-toolchain@nightly
81- with :
82- toolchain : nightly
83- - name : Install `cargo llvm-cov`
84- uses : taiki-e/install-action@cargo-llvm-cov
85- - name : Run tests
86- run : |
87- cargo install cargo2junit
88- cargo llvm-cov --lcov --output-path core.lcov -- -Z unstable-options --format json --report-time | cargo2junit > core-test-results.xml
58+ - uses : actions/checkout@v4
59+
60+ - run : rustup toolchain install nightly --profile minimal --no-self-update
61+ - uses : taiki-e/install-action@cargo-llvm-cov
62+ - uses : taiki-e/install-action@nextest
63+
64+ - run : cargo llvm-cov nextest --lcov --output-path core.lcov --workspace --all-features --all-targets
65+ - run : mv target/nextest/default/core-test-results.xml .
66+
67+ - uses : actions/setup-python@v5
68+ - run : make ci.setup_venv
8969
90- - uses : actions/setup-python@v3
91- - name : Set up venv
92- run : make ci.setup_venv
9370 - name : Run Python tests
9471 run : |
9572 # Clear prior profile data
0 commit comments