Skip to content

Commit 09594d4

Browse files
author
Joe Grund
committed
Add CI
Signed-off-by: Joe Grund <[email protected]>
1 parent ca421e5 commit 09594d4

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
test:
14+
name: Test
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install Rust toolchain
21+
uses: actions-rust-lang/setup-rust-toolchain@v1
22+
with:
23+
toolchain: 1.89.0
24+
targets: x86_64-unknown-linux-gnu
25+
26+
- name: Cache cargo dependencies
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cargo/bin/
31+
~/.cargo/registry/index/
32+
~/.cargo/registry/cache/
33+
~/.cargo/git/db/
34+
target/
35+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
36+
37+
- name: Check formatting
38+
run: cargo fmt --all -- --check
39+
40+
- name: Run clippy
41+
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
42+
43+
- name: Build workspace
44+
run: cargo build --workspace --verbose
45+
46+
- name: Run tests
47+
run: cargo test --workspace --verbose

0 commit comments

Comments
 (0)