Skip to content

Commit

Permalink
build: Use nextest cargo test runner in CI
Browse files Browse the repository at this point in the history
Supports retries for flaky failures. Use 3 retries.
Also limit the db test to run in a separate process, so that
diesel_migration harness doesn't fail with an I/O error.
  • Loading branch information
alcroito committed Sep 24, 2023
1 parent 3c257f3 commit f7fb656
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[profile.ci]
# Don't fail fast in CI to run the full test suite.
fail-fast = false
failure-output = "immediate-final"
retries = 3

[test-groups]
serial-integration = { max-threads = 1 }

[[profile.default.overrides]]
filter = 'test(db::logic::tests::test_do_ops_with_db)'
test-group = 'serial-integration'

[[profile.ci.overrides]]
filter = 'test(db::logic::tests::test_do_ops_with_db)'
test-group = 'serial-integration'
7 changes: 5 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,11 @@ jobs:
- name: Create dummy web artifacts
run: mkdir -p webclients/svelte/build

- name: Run cargo test
run: cargo test ${{ matrix.features && '--features' }} ${{ matrix.features }} ${{ matrix.release && '--release' || '' }} ${{ matrix.no_default_features && '--no-default-features' || '' }} ${{ matrix.all_features && '--all-features' || '' }}
- name: Install latest nextest release
uses: taiki-e/install-action@nextest

- name: Run cargo nextest
run: cargo nextest run --profile ci ${{ matrix.features && '--features' }} ${{ matrix.features }} ${{ matrix.release && '--release' || '' }} ${{ matrix.no_default_features && '--no-default-features' || '' }} ${{ matrix.all_features && '--all-features' || '' }}
env:
RUST_BACKTRACE: full

Expand Down

0 comments on commit f7fb656

Please sign in to comment.