Files
gitea-axi/.gitea/workflows/ci.yml
alexion ccc8dbe998
All checks were successful
CI / test (22) (pull_request) Successful in 1m8s
CI / test (true, 24) (pull_request) Successful in 1m12s
CI / test (22) (push) Successful in 47s
CI / test (true, 24) (push) Successful in 1m4s
ci: matrix over Node 22 and 24, add the bench and packaging tiers (task 0040)
The workflow pinned Node 20, which reached end-of-life in April 2026, while
the manifest promised support down to it — so the entire claimed range below
the single tested version went unverified and its floor was unsupported.

Matrix over the two supported long-term-support majors and narrow the engine
range to `^22 || ^24`, naming exactly what is tested. Narrowing is free now
because nothing has been published and no tags exist.

The benchmark harness tier joins every leg: it is deterministic and needs no
network, and its non-default runner configuration made it easy to believe it
was running when it was not. The end-to-end and packaging tiers run on the
highest leg only, conditioned on a flag attached to that leg through a matrix
`include` entry rather than on a version number restated at each site. The
benchmark smoke tier stays out, since it would pass by skipping.

`@types/node` follows the new floor; it was the last Node 20 reference in the
manifest, and the typecheck runs on every leg.
2026-07-19 23:45:55 -04:00

85 lines
3.0 KiB
YAML

# CI for gitea-axi. Runs on Gitea Actions on the operator's instance; the syntax
# is kept GitHub-Actions-compatible so the GitHub mirror can adopt this file
# nearly verbatim (copy it to .github/workflows/).
#
# The job runs inside a node container so the disposable Gitea service is
# reachable by its service name (`gitea:3000`) on both Gitea Actions and GitHub
# Actions — avoiding the host-vs-service-name networking difference between the
# two platforms.
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
container: node:${{ matrix.node }}-bookworm
strategy:
# Every leg's result is wanted: a failure on one Node major says nothing
# about the other, and cancelling the sibling would hide half the answer.
fail-fast: false
matrix:
# The supported Node majors, matching the manifest's declared engine
# range. Node 20 is end-of-life and deliberately absent.
node: ["22", "24"]
# Augments the highest leg with a flag, so the steps that run once
# share one named condition rather than each restating a version
# number. Keep this entry's `node` matching the last element above.
include:
- node: "24"
highest: true
services:
gitea:
# Pinned to a specific stable tag, bumped deliberately (not floating).
# Kept on the 1.23 line to match the gitea-js client (^1.23.0), so the
# e2e tier exercises response shapes the client was generated against.
image: gitea/gitea:1.23.5
env:
GITEA__security__INSTALL_LOCK: "true"
GITEA__database__DB_TYPE: sqlite3
GITEA__database__PATH: /data/gitea/gitea.db
GITEA__server__ROOT_URL: http://gitea:3000/
GITEA__server__HTTP_PORT: "3000"
GITEA__service__DISABLE_REGISTRATION: "false"
GITEA__service__REQUIRE_SIGNIN_VIEW: "false"
GITEA__log__LEVEL: warn
env:
# The end-to-end tier provisions and drives the CLI against this instance.
GITEA_AXI_E2E_URL: http://gitea:3000
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Typecheck
run: npm run typecheck
- name: Unit and integration tiers (with coverage thresholds)
run: npm run test:coverage
# Deterministic, and needs neither network nor the agent SDK, so it runs
# everywhere. Its non-default runner configuration makes it an easy tier
# to believe is running when it is not.
- name: Benchmark harness tier
run: npm run test:bench
# Exercises the Gitea API contract rather than Node-version behaviour, so
# one leg is enough.
- name: End-to-end tier
if: matrix.highest
run: npm run test:e2e
# Slow, and near enough version-independent — but the only automated guard
# on the distribution artifact, since publishing is a manual command.
- name: Packaging tier
if: matrix.highest
run: npm run test:pack