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