Skip to content

Commit ed77d9b

Browse files
committed
Add CI action to run tests on push
1 parent d89fab0 commit ed77d9b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: ["*"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
test:
14+
name: Run tests
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v5
18+
- uses: dtolnay/rust-toolchain@stable
19+
- uses: actions/cache@v4
20+
with:
21+
path: |
22+
~/.cargo/registry
23+
~/.cargo/git
24+
target
25+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
26+
restore-keys: |
27+
${{ runner.os }}-cargo-
28+
- name: Build
29+
run: cargo build --workspace --all-targets
30+
- name: Run tests
31+
run: cargo test --workspace --all-targets

0 commit comments

Comments
 (0)