Skip to content

Commit 8d0dfd5

Browse files
Added ci.yml to run unit tests, but also check format, run clippy, and build workspace (#45)
1 parent 289456a commit 8d0dfd5

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Rust CI
2+
3+
on:
4+
push:
5+
branches:
6+
- release/0.1.2alpha
7+
8+
pull_request:
9+
branches:
10+
- release/0.1.2alpha
11+
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
17+
env:
18+
CARGO_TERM_COLOR: always
19+
RUSTFLAGS: "-D warnings"
20+
21+
jobs:
22+
test:
23+
name: Format, lint, build, and test
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Check out repository
28+
uses: actions/checkout@v4
29+
30+
- name: Install Rust toolchain
31+
uses: dtolnay/rust-toolchain@stable
32+
with:
33+
components: rustfmt, clippy
34+
35+
- name: Check formatting
36+
run: cargo fmt --all -- --check
37+
38+
- name: Run Clippy
39+
run: cargo clippy --workspace --all-targets --all-features
40+
41+
- name: Build workspace
42+
run: cargo build --workspace --all-targets --all-features
43+
44+
- name: Run tests
45+
run: cargo test --all

0 commit comments

Comments
 (0)