Files
tern-server/.gitea/workflows/ci.yml
T
Mateusz PstruchaandClaude Opus 5.5 77f21a4734
CI / test (push) Successful in 3m26s
Fix the release workflow failing to parse; check workflows in CI
The "Show image" step's run line was a plain YAML scalar containing
": ", which Gitea's parser rejects, so v0.8.1's release never ran. It's
a block scalar now, and CI parses every workflow file so a broken
release.yml fails on master before anything is tagged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 21:08:35 +02:00

59 lines
1.6 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
# One runner serves all three repos, so a queue is a real cost: superseding
# pushes shouldn't each wait for a full build. Releases deliberately aren't
# covered — cancelling a publish halfway is worse than running it twice.
concurrency:
group: ${{ gitea.workflow }}-${{ gitea.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: rocky-10
steps:
- name: Check out source
uses: actions/checkout@v4
# Gitea rejects a workflow file it can't parse without running
# anything, which for release.yml only shows up when a tag is pushed.
# Parsing them all here catches that on master, before tagging.
- name: Check workflow files parse
run: |
python3 - <<'PY'
import glob, yaml
for f in sorted(glob.glob(".gitea/workflows/*.yml")):
yaml.safe_load(open(f))
print("ok", f)
PY
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-
- name: Check formatting
run: cargo fmt --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
# No DATABASE_URL needed: queries are runtime-checked (sqlx::query_as),
# not compile-time macros, so this builds without a live Postgres.
- name: Test
run: cargo test --all