Skip to content

Commit d0cd70f

Browse files
authored
ci: Add new CI checks (#8)
1 parent 7418314 commit d0cd70f

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/rust-build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Rust build
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
paths:
7+
- "src/**"
8+
- "Cargo.*"
9+
- "rustfmt.toml"
10+
- ".github/**"
11+
pull_request:
12+
branches: ["master"]
13+
paths:
14+
- "src/**"
15+
- "Cargo.*"
16+
- "rustfmt.toml"
17+
- ".github/**"
18+
19+
env:
20+
CARGO_TERM_COLOR: always
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
env:
26+
RUSTFLAGS: "-D warnings" # Fail compilation on any warnings
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: actions-rs/toolchain@v1
32+
with:
33+
toolchain: stable
34+
components: clippy
35+
override: true
36+
37+
- name: Build
38+
run: cargo build --verbose
39+
40+
- name: Check formatting
41+
run: cargo fmt --check

0 commit comments

Comments
 (0)