aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2026-03-09 08:07:33 +0300
committerA Farzat <a@farzat.xyz>2026-03-09 08:12:46 +0300
commitcefcaec0ceb322e021caea2155c38426811aae2d (patch)
treea6c75e236a23ed9273fd9fdea360eb4bce867eb7 /.github/workflows
parent350ebb2bee997d6ef305a6e023d9dcc481afb5f8 (diff)
downloadoreilly-epub-cefcaec0ceb322e021caea2155c38426811aae2d.tar.gz
oreilly-epub-cefcaec0ceb322e021caea2155c38426811aae2d.zip
Add simple GitHub workflow job checking fmt & lint
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..a8978fd
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,33 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Install Rust toolchain
+ uses: dtolnay/rust-toolchain@stable
+
+ - name: Cache cargo
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/registry
+ ~/.cargo/git
+ target
+ key: rust-${{ hashFiles('Cargo.lock') }}
+
+ - name: Run rustfmt
+ run: cargo fmt --all -- --check
+
+ - name: Run clippy
+ run: cargo clippy --all-targets --all-features -- -D warnings