Skip to content

Commit

Permalink
Add a nextest compatibility check to GitHub Actions CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshowers committed Jul 20, 2022
1 parent 326d476 commit 5bcec81
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,27 @@ jobs:
with:
command: clippy
args: -- -D warnings

nextest-compat:
name: Check compatibility with nextest
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable

steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v1

- uses: taiki-e/install-action@nextest

- run: ci/nextest-compat.sh
17 changes: 17 additions & 0 deletions ci/nextest-compat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
set -ex -o pipefail

CARGO=${CARGO:-cargo}

cd "$(git rev-parse --show-toplevel)"

echo "Checking benches/bench_main..."

$CARGO nextest list --benches --message-format json > target/nextest-list.json
testcases_len=$(jq '."rust-suites"."criterion::bench/bench_main".testcases | length' target/nextest-list.json)
if [ "$testcases_len" != "38" ]; then
echo "Expected 38 testcases, got $testcases_len"
exit 1
fi

$CARGO nextest run --benches

0 comments on commit 5bcec81

Please sign in to comment.