Skip to content
This repository was archived by the owner on Oct 5, 2025. It is now read-only.

Commit 02ef30d

Browse files
author
Matej Almasi
committed
add github workflow
1 parent 05271a9 commit 02ef30d

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

.github/workflows/main.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: PR Validation
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- "src"
9+
- "Cargo*"
10+
- ".cargo"
11+
- ".github/workflows/main.yml"
12+
- "rustfmt.toml"
13+
push:
14+
branches:
15+
- main
16+
paths:
17+
- "src"
18+
- "Cargo*"
19+
- ".cargo"
20+
- ".github/workflows/main.yml"
21+
- "rustfmt.toml"
22+
23+
env:
24+
CARGO_TERM_COLOR: always
25+
26+
jobs:
27+
build-and-test:
28+
runs-on: ubuntu-latest
29+
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Setup Rust
35+
uses: actions-rust-lang/setup-rust-toolchain@v1
36+
37+
- name: Build
38+
run: cargo build --verbose
39+
40+
- name: Test
41+
run: cargo test --verbose
42+
43+
format:
44+
needs: build-and-test
45+
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v4
51+
52+
- name: Install nightly
53+
uses: actions-rust-lang/setup-rust-toolchain@v1
54+
with:
55+
toolchain: nightly
56+
components: rustfmt
57+
58+
- name: Format
59+
run: cargo +nightly fmt --check
60+
61+
clippy:
62+
needs: build-and-test
63+
64+
runs-on: ubuntu-latest
65+
66+
steps:
67+
- name: Checkout code
68+
uses: actions/checkout@v4
69+
70+
- name: Setup Rust
71+
uses: actions-rust-lang/setup-rust-toolchain@v1
72+
73+
- name: Clippy lint
74+
run: cargo clippy -- -D warnings

0 commit comments

Comments
 (0)