From 00dee137280be358ab9b40c6cff9af6efba1f17d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 21 Feb 2026 23:43:30 +0900 Subject: ci: add GitHub Actions workflow for fmt, clippy, and test Runs on push/PR to main with Rust nightly toolchain, submodule checkout, and Swatinem/rust-cache for build caching. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml 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 -- cgit v1.3.1