commit 265e83bba6c3348dc59f4cedc7abbeaae9622999 parent b2d31b3f3c5e681c898f81767c27b22e49c63ac4 Author: minerva-jupiter <ryouturn@gmail.com> Date: Sun, 12 Jul 2026 10:31:34 +0900 ci: add GitHub Actions workflow for Rust testing and linting Introduces a new CI pipeline that runs cargo build, cargo test, cargo fmt, and cargo clippy on pull requests and pushes to the main branch. Diffstat:
| A | .github/workflows/test.yml | | | 44 | ++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 44 insertions(+), 0 deletions(-)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: Rust Testing + +on: + pull_request: + push: + branches: [ main ] + workflow_dispatch: + workflow_call: + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + name: Test + runs-on: ${{ matrix.os }} + needs: ["check"] + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + steps: + - uses: actions/checkout@v3 + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + - name: Test Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + + check: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + - name: Install Rust fmt + run: rustup component add rustfmt + - name: Install Rust clippy + run: rustup component add clippy + - name: Run rustfmt + run: cargo fmt --all -- --check + - name: Run clippy + run: cargo clippy --all-targets --all-features -- -D warnings