tenseleyflow/rcal / 4c89ac1

Browse files

Add Rust CI workflow

Authored by espadonne
SHA
4c89ac126e6018ea947bc9ef460cc1c1b8d52698
Parents
1c3dce2
Tree
7e8a041

1 changed file

StatusFile+-
A .github/workflows/ci.yml 33 0
.github/workflows/ci.ymladded
@@ -0,0 +1,33 @@
1
+name: CI
2
+
3
+on:
4
+  push:
5
+    branches: [trunk]
6
+  pull_request:
7
+    branches: [trunk]
8
+
9
+env:
10
+  CARGO_TERM_COLOR: always
11
+
12
+jobs:
13
+  rust:
14
+    name: Rust
15
+    runs-on: ubuntu-latest
16
+
17
+    steps:
18
+      - name: Checkout
19
+        uses: actions/checkout@v4
20
+
21
+      - name: Install Rust
22
+        uses: dtolnay/rust-toolchain@stable
23
+        with:
24
+          components: clippy, rustfmt
25
+
26
+      - name: Check formatting
27
+        run: cargo fmt --all -- --check
28
+
29
+      - name: Run clippy
30
+        run: cargo clippy --all-targets --all-features -- -D warnings
31
+
32
+      - name: Run tests
33
+        run: cargo test --all-targets --all-features