From cc965e7c0a0b5f00e7c570c761b2a4f862568233 Mon Sep 17 00:00:00 2001 From: Michael Bradley Date: Wed, 12 Mar 2025 22:24:36 -0400 Subject: [PATCH] Add CI jobs --- .forgejo/workflows/build.yaml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .forgejo/workflows/build.yaml diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml new file mode 100644 index 0000000..a3cc716 --- /dev/null +++ b/.forgejo/workflows/build.yaml @@ -0,0 +1,42 @@ +--- +on: [push] + +name: CI + +jobs: + formatting: + name: Formatting + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Rust + uses: https://github.com/dtolnay/rust-toolchain@nightly + with: + components: rustfmt + - name: Check Rust formatting + run: cargo fmt --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Rust + uses: https://github.com/dtolnay/rust-toolchain@nightly + with: + components: clippy + - name: Run Clippy + run: cargo clippy -- -D warnings + + build: + name: Build + runs-on: ubuntu-22.04 + steps: + - name: Checkout the code + uses: actions/checkout@v4 + - name: Set up Rust + uses: https://github.com/dtolnay/rust-toolchain@nightly + - name: Build project + run: cargo build