Skip to content

Commit 84b2f3d

Browse files
committed
Run benchmarks as tests in CI
1 parent b9bed6f commit 84b2f3d

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/rust.yml

+13-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ name: Rust
33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Check fmt
11+
run: cargo fmt -- --check
12+
13+
test:
714
strategy:
815
matrix:
916
platform: [ubuntu-latest, windows-latest]
@@ -15,20 +22,24 @@ jobs:
1522
RUSTFLAGS: -C instrument-coverage
1623

1724
steps:
25+
- uses: actions/checkout@v3
1826
- name: Install coverage reporter (llvm-tools-preview)
1927
if: runner.os == 'Linux'
2028
run: rustup component add llvm-tools-preview
2129
- name: Install coverage reporter (grcov)
2230
if: runner.os == 'Linux'
2331
run: cargo install grcov
24-
- uses: actions/checkout@v1
32+
2533
- name: Build
2634
run: cargo build
2735
- name: Build benchmarks
2836
run: cargo bench --no-run
2937
- name: Build benchmarks (compare)
3038
working-directory: compare
3139
run: cargo bench --no-run
40+
- name: Run tests + benchmarks
41+
run: cargo test --all-features --benches --tests
42+
3243
- name: Run tests (no features)
3344
env:
3445
LLVM_PROFILE_FILE: coverage/no-features-%p-%m.profraw
@@ -67,6 +78,4 @@ jobs:
6778
flags: unittests
6879
verbose: true
6980
continue-on-error: true
70-
- name: Check fmt
71-
run: cargo fmt -- --check
7281

0 commit comments

Comments
 (0)