Skip to content

Commit

Permalink
tests: run benchmarks in separate CI check (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
sd2k authored Jan 14, 2025
1 parent 6291626 commit 457269a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ jobs:
- name: Run doc tests
run: just doctest

bench:
name: Run benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
with:
bins: cargo-nextest,just
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run benchmarks in test mode
run: just test-bench

test-book:
name: Test Book
runs-on: ubuntu-latest
Expand Down
13 changes: 12 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,25 @@ test:
--exclude *-js \
--exclude pyaugurs

# Run all unit and integration tests, plus examples and benchmarks, except for those which require `iai` (which isn't available on all platforms) and the Prophet benchmarks which require a STAN installation.
# Run all unit and integration tests, plus examples, except for those which require `iai` (which isn't available on all platforms) and the Prophet benchmarks which require a STAN installation.
test-all:
cargo nextest run \
--all-features \
--all-targets \
--workspace \
--exclude *-js \
--exclude pyaugurs \
-E 'not (binary(/iai/) | binary(/prophet-cmdstan/) | kind(bench))'

# Run benchmarks in "test mode" (but with optimizations) using nextest.
test-bench:
cargo nextest run \
--release \
--all-features \
--benches \
--workspace \
--exclude *-js \
--exclude pyaugurs \
-E 'not (binary(/iai/) | binary(/prophet-cmdstan/))'

doctest:
Expand Down

0 comments on commit 457269a

Please sign in to comment.