diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..5618cf9 --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + pull_request: + +jobs: + ci: + runs-on: docker + container: rust:latest + steps: + - uses: actions/checkout@v4 + + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/bin + target + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + + - name: Install toolchain components + run: rustup component add clippy rustfmt + + - name: Install cargo-make and cargo-audit + run: | + for crate in cargo-make cargo-audit; do + command -v "$crate" >/dev/null 2>&1 || cargo install "$crate" + done + + - name: Run CI checks + run: cargo make ci