From 62f375d333521c9e19d1bd54c08705d28a7f37c0 Mon Sep 17 00:00:00 2001 From: phoenix Date: Sat, 20 Jun 2026 23:27:33 -0400 Subject: [PATCH] Added workflow --- .gitea/workflows/pr.yml | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .gitea/workflows/pr.yml diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml new file mode 100644 index 0000000..dcb1a01 --- /dev/null +++ b/.gitea/workflows/pr.yml @@ -0,0 +1,50 @@ +name: catapult PR + +on: + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + + +jobs: + check: + name: Check + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.96 + - uses: Swatinem/rust-cache@v2 + - run: | + cargo check + + fmt: + name: Rustfmt + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.96 + - run: rustup component add rustfmt + - uses: Swatinem/rust-cache@v2 + - run: | + cargo fmt --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.96 + - run: rustup component add clippy + - uses: Swatinem/rust-cache@v2 + - run: | + cargo clippy -- -D warnings