Add Forgejo Actions CI workflow
Runs cargo fmt/clippy/test/audit via the existing cargo-make ci task on every push and pull request. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
fe2039c05e
commit
4b751dc246
1 changed files with 35 additions and 0 deletions
35
.forgejo/workflows/ci.yml
Normal file
35
.forgejo/workflows/ci.yml
Normal file
|
|
@ -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
|
||||||
Loading…
Reference in a new issue