Skip to content

Commit dfdeefb

Browse files
committed
Add workflow for rust code
1 parent 38bbb2b commit dfdeefb

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Continuous Integration
2+
3+
on: push
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
8+
jobs:
9+
ci:
10+
runs-on: ubuntu-latest
11+
name: Continuous Integration
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up cargo cache
15+
uses: actions/cache@v4
16+
continue-on-error: false
17+
with:
18+
path: |
19+
~/.cargo/bin/
20+
~/.cargo/registry/index/
21+
~/.cargo/registry/cache/
22+
~/.cargo/git/db/
23+
target/
24+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
25+
restore-keys: ${{ runner.os }}-cargo-
26+
- name: cargo test
27+
run: cargo test
28+
- name: cargo clippy
29+
run: cargo clippy -- -D warnings
30+
- name: cargo fmt
31+
run: cargo fmt --check

0 commit comments

Comments
 (0)