Skip to content

Commit a33cff2

Browse files
committed
Add basic CI workflow in Github
1 parent 720db44 commit a33cff2

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/rust.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
fmt-check:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Check code formatting
18+
run: cargo fmt --check
19+
20+
clippy-no-std:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Clippy (no_std)
25+
run: cargo clippy --verbose
26+
- name: Clippy (no_std + borsh)
27+
run: cargo clippy --verbose --no-default-features
28+
29+
clippy-with-tests-and-benches:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Clippy (with tests)
34+
run: cargo clippy --verbose --tests
35+
- name: Clippy (with tests + borsh)
36+
run: cargo clippy --verbose --tests --benches
37+
38+
test:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Run tests
43+
run: cargo test --verbose
44+
45+
test-no-std:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v4
49+
- name: Run tests
50+
run: cargo test --verbose --no-default-features
51+
52+
docs:
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v4
56+
- name: Generate docs
57+
run: cargo doc --verbose

0 commit comments

Comments
 (0)