doubleo7/.forgejo/workflows/ci.yml
Austin Schaefer 296ab860c7
All checks were successful
CI / test (pull_request) Successful in 14m6s
Fix CI running twice per PR commit
push and pull_request both fired for commits on a branch with an open
PR. Scope push to master only, matching sporah's workflow, so branch
commits trigger just the pull_request run.
2026-08-18 13:55:01 +02:00

35 lines
697 B
YAML

name: CI
on:
push:
branches: [master]
pull_request:
jobs:
test:
runs-on: rust-ci
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry and build artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-
- name: Check formatting
run: cargo fmt -- --check
- name: Lint
run: cargo clippy --all-targets -- -D warnings
- name: Build
run: cargo build
- name: Test
run: cargo test