mirror of
https://github.com/RGBCube/cstree
synced 2025-07-27 09:07:44 +00:00
Support and use cargo nextest
(#52)
This commit is contained in:
parent
c5279bae7d
commit
30597dbb8b
3 changed files with 63 additions and 7 deletions
29
.config/nextest.toml
Normal file
29
.config/nextest.toml
Normal 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"
|
25
.github/workflows/main.yml
vendored
25
.github/workflows/main.yml
vendored
|
@ -14,6 +14,7 @@ on:
|
||||||
env:
|
env:
|
||||||
RUST_LOG: info
|
RUST_LOG: info
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
@ -27,23 +28,33 @@ jobs:
|
||||||
rust: [stable, nightly]
|
rust: [stable, nightly]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: hecrj/setup-rust-action@v1
|
- uses: hecrj/setup-rust-action@v1
|
||||||
with:
|
with:
|
||||||
rust-version: ${{ matrix.rust }}
|
rust-version: ${{ matrix.rust }}
|
||||||
|
- uses: taiki-e/install-action@nextest
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: nextest
|
||||||
args: --all-targets --verbose
|
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
|
- uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --all-targets --verbose --all-features
|
args: --doc --verbose --all-features
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions/upload-artifact@v2 # upload test results
|
||||||
|
if: success() || failure() # run this step even if previous step failed
|
||||||
with:
|
with:
|
||||||
command: test
|
name: test-results-${{ matrix.rust }}-${{ matrix.os }}
|
||||||
args: --all-targets --verbose --all-features --release
|
path: target/nextest/**/junit-*.xml
|
||||||
|
|
||||||
check:
|
check:
|
||||||
name: Check
|
name: Check
|
||||||
|
|
16
.github/workflows/test-report.yml
vendored
Normal file
16
.github/workflows/test-report.yml
vendored
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue