aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..e135537
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,37 @@
+name: CI
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+ branches: [main]
+
+env:
+ CARGO_TERM_COLOR: always
+
+jobs:
+ check:
+ name: Check, Test & Lint
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ submodules: true
+
+ - name: Install Rust nightly
+ uses: dtolnay/rust-toolchain@nightly
+ with:
+ components: clippy, rustfmt
+
+ - name: Cache cargo registry & build
+ uses: Swatinem/rust-cache@v2
+
+ - name: Format check
+ run: cargo fmt --check
+
+ - name: Clippy
+ run: cargo clippy -- -D warnings
+
+ - name: Test
+ run: cargo test