feat: Gitea Actions compatibility test suite
Setup Runtime (C4) / setup-go (push) Successful in 2s
Gitea Actions Compatibility Suite / probe (push) Successful in 1s
Checkout Variants (C1) / checkout-variants (push) Successful in 3s
Setup Runtime (C4) / setup-java (push) Successful in 45s
Setup Runtime (C4) / setup-node (push) Successful in 3s
Setup Runtime (C4) / setup-python (push) Successful in 3s
Artifacts v3+v4 round-trip / producer (push) Successful in 3s
C3 cache / restore (push) Successful in 44s
C3 cache / seed (push) Successful in 44s
C5 - Contexts / consume needs output (push) Successful in 1s
C5 - Contexts / github/env/token/secrets/status-fns (push) Successful in 1s
C5 - Contexts / failure-test (push) Successful in 0s
C5 - Contexts / produce needs output (push) Successful in 1s
06 Workflow Commands / workflow-commands (push) Successful in 1s
C7 - services / services (postgres + redis, healthcheck-gated) (push) Successful in 1s
C7 - services / container (node:20, bash present) (push) Successful in 13s
C8 - Composite Action and Reusable Workflow / composite-reusable (push) Successful in 0s
09-control-flow / timeout + continue-on-error + concurrency (push) Successful in 1m1s
Artifacts v3+v4 round-trip / consumer (push) Successful in 0s
Gitea Divergences (C10) / environment-result-check (push) Successful in 2s
Gitea Divergences (C10) / environment-non-blocking (push) Successful in 0s
Gitea Divergences (C10) / problem-matcher-emit (push) Successful in 1s
Gitea Divergences (C10) / upload-artifact-v4-reconfirm (push) Successful in 0s

A self-validating test suite that proves Gitea's implementations of
GitHub-style actions behave like GitHub's. Push to any Gitea instance
with a registered runner — on push or manual dispatch, it runs 10
independent test workflows covering checkout, artifacts, caching,
language setup, expression contexts, workflow commands, services,
composite/reusable workflows, control flow, and known divergences.

Components:
- lib/assert.sh — self-asserting shell helper library (assert_eq,
  assert_contains, assert_exists, assert_not_exists, assert_match,
  sha256_of) with verified negative fail path
- 10 reusable workflows (on: workflow_call):
  01-checkout, 02-artifacts, 03-cache, 04-setup-runtime,
  05-contexts, 06-workflow-commands, 07-services,
  08-composite-reusable, 09-control-flow, 10-gitea-divergences
- 00-suite-runner.yml — sole entry (on: push + workflow_dispatch):
  probe gate (Gitea >= 1.22.0) -> c1-c10 parallel callers
  (c5/c8 forward secrets: inherit for act_runner #125) ->
  aggregate (if: always, skipped-as-failure)
- Fixtures: LFS 5MB binary, git tag v1-test, 4 language lockfiles
  (npm/go/pip/maven), sparse-cone layout
- Makefile: make lint (actionlint static gate)
- README: prerequisites, per-test expectations, correction table,
  manual eyeball checklist for UI-only behaviors
This commit is contained in:
tqcq
2026-07-07 12:12:17 +00:00
commit 703410dc3d
29 changed files with 1702 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
---
# 00-suite-runner.yml - Gitea version probe for the compatibility suite.
#
# Each test workflow (01-10) now runs independently with its own
# push/workflow_dispatch triggers. This file retains only the probe job
# for a quick Gitea version check (>= 1.22.0 required to parse workflows).
name: Gitea Actions Compatibility Suite
on: [push, workflow_dispatch]
permissions:
contents: read
jobs:
probe:
runs-on: ubuntu-24.04
outputs:
gitea-version: ${{ steps.check.outputs.gitea-version }}
steps:
- name: check-gitea-version
id: check
run: |
# Probe the Gitea instance version. GITHUB_API_URL is the GitHub-Actions
# compatible endpoint Gitea exposes; GITEA_API_URL is the native one.
VERSION=""
if [ -n "${GITHUB_API_URL:-}" ]; then
VERSION=$(curl -sf "${GITHUB_API_URL}/version" 2>/dev/null | grep -o '"version":"[^"]*"' | head -1 | cut -d'"' -f4) || true
fi
if [ -n "${GITEA_API_URL:-}" ]; then
VERSION=$(curl -sf "${GITEA_API_URL}/version" 2>/dev/null | grep -o '"version":"[^"]*"' | head -1 | cut -d'"' -f4) || true
fi
echo "Detected Gitea version: ${VERSION:-unknown}"
echo "gitea-version=${VERSION:-unknown}" >> "$GITHUB_OUTPUT"
# Assert >= 1.22.0 (minimum to parse/accept workflows).
MAJOR=0; MINOR=0; PATCH=0
if [[ "$VERSION" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
MAJOR="${BASH_REMATCH[1]}"
MINOR="${BASH_REMATCH[2]}"
PATCH="${BASH_REMATCH[3]}"
fi
if [ "$MAJOR" -lt 1 ] || { [ "$MAJOR" -eq 1 ] && [ "$MINOR" -lt 22 ]; }; then
echo "::error::Gitea version ${VERSION:-unknown} is below 1.22.0 (minimum to parse/accept workflows). Suite aborted."
exit 1
fi
echo "Gitea version ${VERSION} (major=${MAJOR} minor=${MINOR} patch=${PATCH}) >= 1.22.0: OK"
- name: info-action-mirroring
continue-on-error: true
run: |
# Best-effort: check that action mirroring can resolve at least one actions/* ref.
echo "Best-effort action mirroring check (informational only, not a hard gate)"
echo "If actions fail to resolve at runtime, check ACTIONS_URL / DEFAULT_ACTIONS_URL settings"
- name: info-storage-cache
continue-on-error: true
run: |
# Best-effort: note about storage and cache.
echo "Storage backend and cache server should be configured. Artifacts and cache tests will fail if not."