Files
arena-tracker/.gitea/workflows/ci.yml
T
nessarandClaude Opus 5.5 fe36a431dc
CI / relay (pull_request) Successful in 37s
CI / core (pull_request) Successful in 52s
CI / relay (push) Successful in 40s
CI / core (push) Successful in 1m6s
Relay the app's Riot calls with the key and the quota, and serve the site (#148, #145)
New workspace member arena-tracker-relay: it holds the Riot key from the
environment and serves the app's six Riot calls as /{routing value}{Riot path}.
Any other route, method, routing value, queue or count above 100 gets 404
without calling Riot. Fixed-window limits per routing value (production
limits) and per client address answer 429 with Retry-After at once; a Riot
429 is passed with its delay and suspends its routing value. Riot's 401/403
become 503 (except a timeline's 403), an unreachable Riot 502. The log holds
the call type, status and duration only; nothing is written to disk.

The same binary serves the site pages of site/ (#145), built in, unlogged.

Tested over HTTP against a local fake Riot. A separate `relay` CI job, now
required on develop and main. ADR-0008 replaces ADR-0001's personal key;
docs/service-relais.md says how to run it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:20:34 +01:00

58 lines
1.7 KiB
YAML

# The core and the relay are checked, each in its own job: the app crate (GPUI) only builds on
# Windows (ADR-0003). Both jobs are required checks for merging (docs/publication.md).
# Betas of develop and stables of main are published from the build PC once these checks pass (docs/publication.md).
name: CI
on:
pull_request:
push:
branches:
- main
- develop
# CI never publishes: a read-only job token is enough.
permissions:
contents: read
jobs:
core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust stable (rustfmt, clippy)
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --component rustfmt,clippy
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Format
run: cargo fmt -p arena-tracker-core --check
- name: Clippy
run: cargo clippy -p arena-tracker-core --all-targets --locked -- -D warnings
- name: Tests
run: cargo test -p arena-tracker-core --locked
- name: Publication tests
run: python3 scripts/test_publish.py
relay:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust stable (rustfmt, clippy)
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --component rustfmt,clippy
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Format
run: cargo fmt -p arena-tracker-relay --check
- name: Clippy
run: cargo clippy -p arena-tracker-relay --all-targets --locked -- -D warnings
- name: Tests
run: cargo test -p arena-tracker-relay --locked