Skip to content

Commit 35ee530

Browse files
qmonnetmvachhar
authored andcommitted
ci: Add basic workflow to build the repository on Pull Requests
Avoid accidental breakages by checking that changes from new Pull Requests build correctly. We also run "cargo test", although there's no test in the project at the moment. We even run Clippy and the format checker, for good measure. Signed-off-by: Quentin Monnet <qmo@qmon.net>
1 parent 8d94e71 commit 35ee530

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: build.yml
2+
3+
on:
4+
pull_request: {}
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
runs-on: lab
12+
steps:
13+
- name: Install Rust toolchain
14+
uses: actions-rs/toolchain@v1
15+
with:
16+
profile: minimal
17+
toolchain: stable
18+
components: clippy, rustfmt
19+
20+
- name: Checkout repository
21+
uses: actions/checkout@v5
22+
with:
23+
fetch-depth: 1
24+
persist-credentials: false
25+
26+
- name: Build project
27+
run: cargo build
28+
29+
- name: Run tests
30+
run: cargo test
31+
32+
- name: Run clippy
33+
run: cargo clippy -- -D warnings
34+
35+
- name: Check code formatting
36+
run: cargo fmt -- --check

0 commit comments

Comments
 (0)