Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[profile.ci]
fail-fast = false
leak-timeout = "200ms"

[profile.ci.junit]
path = "nextest-results.xml"
43 changes: 13 additions & 30 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ on:
test_results_url:
description: "URL of the test results artifact"
value: ${{ jobs.nextest.outputs.test_results_url }}
doctest_results_url:
description: "URL of the doctest results artifact"
value: ${{ jobs.doctest.outputs.test_results_url }}
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -155,41 +152,27 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2
# install tool to convert cargo's JSON test output to JUNIT format
- run: |
cargo install cargo2junit
# Using nextest because it's faster than built-in test
- uses: taiki-e/install-action@nextest
- name: Run cargo nextest
run: |
cargo nextest run --message-format libtest-json-plus ${{ matrix.feature-flags }} > testresults${{ matrix.feature-flags }}.json
cargo nextest run ${{ matrix.feature-flags }} --profile ci
- name: Run doctests
run: |
# we use tee to let cargo test print to the console
RUSTC_BOOTSTRAP=1 cargo test --doc ${{ matrix.feature-flags }} -- -Z unstable-options --format json --report-time | tee target/doctest-results.json
# write output to same directory as the one used by cargo nextest in order
# to flatten the directory hierarchy when uploading the test results
cat target/doctest-results.json | cargo2junit > target/nextest/ci/doctest-results.xml

- name: Upload all-features test results artifact
id: test_results
if: matrix.feature-flags == '--all-features'
uses: actions/upload-artifact@v4
with:
name: test-results
path: testresults--all-features.json

# [impl->req~up-language-ci-test~1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this scenario, where did you move the req implementation marker?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already on the nextest job which now also includes running the doctests ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see

doctest:
# Run doctests separately, as nextest doesn't yet (https://github.com/nextest-rs/nextest/issues/16)
outputs:
test_results_url: ${{ steps.doctest_results.outputs.artifact-url }}
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Run doc tests
run: |
RUSTC_BOOTSTRAP=1 cargo test --doc --all-features -- -Z unstable-options --format json --report-time > doctestresults--all-features.json
- name: Upload doctest results artifact
id: doctest_results
uses: actions/upload-artifact@v4
with:
name: doctest-results
path: doctestresults--all-features.json
# this will include the nextest and doctest result files in the archive's root folder
path: target/nextest/ci/*-results.xml
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
file_glob: true
tag: ${{ github.ref }}

# Test report - we later need the download_url output of the upload step
# Test results - we later need the download_url output of the upload step
- name: Download test report
uses: actions/download-artifact@v4
with:
Expand Down