From 6a90c770fcbd7010b5d48f99f8ae905e1b362a47 Mon Sep 17 00:00:00 2001 From: KD Date: Sun, 30 Mar 2025 14:44:23 -0400 Subject: [PATCH] Added workflow --- .github/workflows/workflow.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..4b870e8 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,31 @@ +name: Rust CI + +on: + push: + branches: [ "master" ] # Changed from main to master + pull_request: + branches: [ "master" ] # Changed from main to master + +jobs: + build: + + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + - name: Install Rust 1.85.0 + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.85.0 + components: clippy, rustfmt + override: true + - name: Cache dependencies + uses: Swatinem/rust-cache@v2 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + - name: Run clippy + run: cargo clippy -- -D warnings + - name: Run rustfmt + run: cargo fmt --all -- --check