Skip to content

Commit 127604a

Browse files
committed
Add CI checks as github actions
1 parent 33d7e2d commit 127604a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Numtracker CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dtolnay/rust-toolchain@stable
17+
with:
18+
toolchain: stable
19+
components: rustfmt, clippy
20+
- uses: Swatinem/rust-cache@v2
21+
22+
- name: Check formating
23+
run: cargo fmt -- --check
24+
25+
- name: Clippy
26+
run: |
27+
cargo --version
28+
cargo clippy --version
29+
cargo clippy --all-targets --all-features -- --deny warnings
30+
31+
- name: Check formating
32+
run: cargo fmt -- --check
33+
34+
- name: Run tests
35+
run: cargo test --verbose

0 commit comments

Comments
 (0)