1
Fork 0
mirror of https://github.com/RGBCube/cstree synced 2025-07-27 00:57:44 +00:00

Support and use cargo nextest (#52)

This commit is contained in:
DQ 2023-04-18 21:40:28 +02:00 committed by GitHub
parent c5279bae7d
commit 30597dbb8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 7 deletions

29
.config/nextest.toml Normal file
View file

@ -0,0 +1,29 @@
[profile.default]
# Print out output for failing tests as soon as they fail, and also at the end
# of the run (for easy scrollability).
failure-output = "immediate-final"
[profile.ci-default-features]
# Do not cancel the test run on the first failure.
fail-fast = false
[profile.ci-default-features.junit]
path = "junit-default-features.xml"
report-name = "default-features"
[profile.ci-all-features]
# Do not cancel the test run on the first failure.
fail-fast = false
[profile.ci-all-features.junit]
path = "junit-all-features.xml"
report-name = "all-features"
[profile.ci-all-features-release]
# Do not cancel the test run on the first failure.
fail-fast = false
[profile.ci-all-features-release.junit]
path = "junit-all-features-release.xml"
report-name = "all-features-release"

View file

@ -14,6 +14,7 @@ on:
env:
RUST_LOG: info
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
jobs:
test:
@ -27,23 +28,33 @@ jobs:
rust: [stable, nightly]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- uses: taiki-e/install-action@nextest
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-targets --verbose
command: nextest
args: run --profile ci-default-features --tests --examples --verbose
- uses: actions-rs/cargo@v1
with:
command: nextest
args: run --profile ci-all-features --tests --examples --verbose --all-features
- uses: actions-rs/cargo@v1
with:
command: nextest
args: run --profile ci-all-features-release --tests --examples --verbose --all-features --release
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-targets --verbose --all-features
- uses: actions-rs/cargo@v1
args: --doc --verbose --all-features
- uses: actions/upload-artifact@v2 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
command: test
args: --all-targets --verbose --all-features --release
name: test-results-${{ matrix.rust }}-${{ matrix.os }}
path: target/nextest/**/junit-*.xml
check:
name: Check

16
.github/workflows/test-report.yml vendored Normal file
View file

@ -0,0 +1,16 @@
name: 'Test Report'
on:
workflow_run:
workflows: ['CI'] # runs after CI workflow
types:
- completed
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
with:
artifact: /test-results-([a-z]*)-(.*)/ # artifact name: test-results-<toolchain>-<os>
name: cargo nextest results $1 $2 # Name of the check run which will be created
path: './**/junit-*.xml' # Path to test results (inside artifact .zip)
reporter: java-junit # Format of test results