Skip to content

Commit 8c1dca2

Browse files
authored
Merge pull request #5 from 0xPolygonZero/feat/ci
2 parents 56fbd31 + bd06ffe commit 8c1dca2

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/cI.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
13+
env:
14+
CARGO_TERM_COLOR: always
15+
16+
jobs:
17+
clippy:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 10
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: dtolnay/rust-toolchain@nightly
23+
with:
24+
components: clippy
25+
- uses: Swatinem/rust-cache@v2
26+
with:
27+
cache-on-failure: true
28+
- run: cargo clippy --workspace --all-targets --all-features
29+
env:
30+
RUSTFLAGS: -Dwarnings
31+
32+
rustfmt:
33+
runs-on: ubuntu-latest
34+
timeout-minutes: 10
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: dtolnay/rust-toolchain@nightly
38+
with:
39+
components: rustfmt
40+
- run: cargo fmt --all --check
41+
42+
test:
43+
runs-on: ubuntu-latest
44+
timeout-minutes: 20
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: dtolnay/rust-toolchain@stable
48+
- uses: Swatinem/rust-cache@v2
49+
with:
50+
cache-on-failure: true
51+
- run: cargo test --workspace

0 commit comments

Comments
 (0)