From fda7e0db34d14af9095dfe0596b91abe7e98694e Mon Sep 17 00:00:00 2001 From: Jordan Oroshiba Date: Wed, 13 Mar 2024 16:57:06 -0700 Subject: [PATCH] chore(ci): switch to nextest (#812) ## Summary Using nextest instead of cargo test in ci flow to reduce flaky test blocking, and improve reporting about slow and flaky tests. --- .config/nextest.toml | 7 +++++++ .github/workflows/test.yml | 9 ++++----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 .config/nextest.toml diff --git a/.config/nextest.toml b/.config/nextest.toml new file mode 100644 index 0000000000..adc5f19ce9 --- /dev/null +++ b/.config/nextest.toml @@ -0,0 +1,7 @@ +[profile.default] +retries = { backoff = "exponential", count = 10, delay = "1s", jitter = true, max-delay = "10s" } +status-level = "all" +final-status-level = "slow" +failure-output = "immediate-final" +fail-fast = false +slow-timeout = { period = "30s", terminate-after = 4 } diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ae80ac888f..0bb2e33ad1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,22 +89,21 @@ jobs: - uses: Swatinem/rust-cache@v2.7.3 with: cache-provider: "buildjet" + - name: Install nextest + uses: taiki-e/install-action@nextest - uses: arduino/setup-protoc@v3 with: version: "24.4" repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Build tests run: | - cargo test --no-run --release \ + cargo nextest archive --archive-file=archive.tar.zst --release \ --all-features \ --all-targets - name: Run tests timeout-minutes: 20 run: | - cargo test --release \ - --all-features \ - --all-targets \ - -- --include-ignored + cargo nextest run --archive-file=archive.tar.zst -- --include-ignored doctest: runs-on: buildjet-8vcpu-ubuntu-2204