Skip to content

Commit 6f987bb

Browse files
committed
Add GHA
1 parent 76b3980 commit 6f987bb

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: jdx/mise-action@v2
17+
with:
18+
install: true
19+
20+
- name: Run tests
21+
run: cargo test --all-features
22+
23+
- name: Run tests (no default features)
24+
run: cargo test --no-default-features
25+
26+
- name: Run examples
27+
run: |
28+
cargo run --example const_example
29+
cargo run --example domain_specific
30+
cargo run --example generic_demo
31+
32+
fmt:
33+
name: Format
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- uses: jdx/mise-action@v2
39+
with:
40+
install: true
41+
42+
- name: Install nightly rustfmt
43+
run: rustup toolchain install nightly --component rustfmt
44+
45+
- name: Check formatting
46+
run: cargo +nightly fmt -- --check
47+
48+
clippy:
49+
name: Clippy
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- uses: jdx/mise-action@v2
55+
with:
56+
install: true
57+
58+
- name: Run clippy
59+
run: cargo clippy --all-features -- -D warnings

0 commit comments

Comments
 (0)