16e729ea95
Gitea Actions Compatibility Suite / probe (push) Has been cancelled
Gitea Actions Compatibility Suite / c1 (push) Has been cancelled
Gitea Actions Compatibility Suite / c2 (push) Has been cancelled
Gitea Actions Compatibility Suite / c3 (push) Has been cancelled
Gitea Actions Compatibility Suite / c4 (push) Has been cancelled
Gitea Actions Compatibility Suite / c5 (push) Has been cancelled
Gitea Actions Compatibility Suite / c6 (push) Has been cancelled
Gitea Actions Compatibility Suite / c7 (push) Has been cancelled
Gitea Actions Compatibility Suite / c8 (push) Has been cancelled
Gitea Actions Compatibility Suite / c9 (push) Has been cancelled
Gitea Actions Compatibility Suite / c10 (push) Has been cancelled
Gitea Actions Compatibility Suite / aggregate (push) Has been cancelled
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, vendored gitea-upload-artifact fork pinned to commit SHA - Makefile: make lint (actionlint static gate) - README: prerequisites, per-test expectations, correction table, manual eyeball checklist for UI-only behaviors
59 lines
2.1 KiB
YAML
59 lines
2.1 KiB
YAML
name: C7 - services
|
|
|
|
# C7 verifies the services: block (postgres:16 + redis:7 with healthchecks) and a
|
|
# container: job (node:20). Connectivity to each service is asserted AFTER the
|
|
# runner-gated healthcheck passes; the healthcheck is the source of truth for
|
|
# "started". The container job proves the repo is mounted and assertions work
|
|
# inside a non-host image. Docker must be available on the runner. Service
|
|
# healthchecks may be flaky on resource-constrained runners; that is expected and
|
|
# surfaced as a clear job failure rather than a silent pass.
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
services-test:
|
|
name: services (postgres + redis, healthcheck-gated)
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
env:
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: testdb
|
|
options: >-
|
|
--health-cmd "pg_isready -U postgres"
|
|
--health-interval 5s
|
|
--health-timeout 5s
|
|
--health-retries 10
|
|
redis:
|
|
image: redis:7
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 5s
|
|
--health-timeout 5s
|
|
--health-retries 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Assert postgres and redis reachable after healthcheck
|
|
# The runner blocks step execution until every service healthcheck passes,
|
|
# so by the time this step runs the services are confirmed started. We then
|
|
# prove the job can actually reach them over localhost.
|
|
run: |
|
|
source lib/assert.sh
|
|
pg_isready -h localhost -U postgres
|
|
assert_eq "pg-ok" "pg-ok" "postgres reachable"
|
|
assert_eq "$(redis-cli -h localhost ping)" "PONG" "redis reachable"
|
|
|
|
container-test:
|
|
name: container (node:20, bash present)
|
|
runs-on: ubuntu-latest
|
|
container: node:20
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Assert repo accessible and assertions work inside container
|
|
run: |
|
|
source lib/assert.sh
|
|
assert_exists lib/assert.sh "assert.sh reachable inside container"
|
|
assert_eq "container-ok" "container-ok" "assertion works inside container"
|