724f2aca5d
Gitea Actions Compatibility Suite / probe (push) Successful in 0s
Gitea Actions Compatibility Suite / checkout (push) Successful in 4s
Gitea Actions Compatibility Suite / artifacts (push) Successful in 3s
Gitea Actions Compatibility Suite / cache (push) Successful in 1m25s
Gitea Actions Compatibility Suite / gitea-divergences (push) Successful in 2s
Gitea Actions Compatibility Suite / setup-runtime (push) Successful in 44s
Gitea Actions Compatibility Suite / contexts (push) Successful in 0s
Gitea Actions Compatibility Suite / workflow-commands (push) Successful in 0s
Gitea Actions Compatibility Suite / services (push) Successful in 12s
Gitea Actions Compatibility Suite / composite-reusable (push) Successful in 1s
Gitea Actions Compatibility Suite / control-flow (push) Successful in 1m1s
Gitea Actions Compatibility Suite / aggregate (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
73 lines
3.0 KiB
YAML
73 lines
3.0 KiB
YAML
name: C8 - Composite Action and Reusable Workflow
|
|
|
|
# T11: Verify (a) local composite action input/output round-trip and (b) reusable
|
|
# workflow_call inputs/secrets inheritance. This is an INTENTIONAL divergence
|
|
# probe for act_runner #125 (reusable-workflow secret/inputs passthrough). The
|
|
# secrets assertion (step b) is expected to FAIL on Gitea versions that have not
|
|
# yet fixed the secret-forwarding bug; that failure is the divergence surfacing.
|
|
# The caller (c8 in 00-suite-runner.yml) MUST forward secrets explicitly.
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
who:
|
|
description: 'Who to greet'
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
TEST_SECRET:
|
|
required: true
|
|
|
|
jobs:
|
|
composite-reusable:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
# (a) Composite action input/output round-trip.
|
|
# The local composite action at lib/composite-greet receives inputs.who
|
|
# and must surface a greeting output containing that same value.
|
|
- name: Run composite greet action
|
|
id: greet-step
|
|
uses: ./lib/composite-greet
|
|
with:
|
|
who: ${{ inputs.who }}
|
|
|
|
- name: Assert composite action output round-trip
|
|
shell: bash
|
|
env:
|
|
GREETING: ${{ steps.greet-step.outputs.greeting }}
|
|
WHO: ${{ inputs.who }}
|
|
run: |
|
|
# shellcheck disable=SC1091
|
|
source ./lib/assert.sh
|
|
ok=0
|
|
assert_contains "$GREETING" "$WHO" "composite action output contains input" || ok=1
|
|
# Assert the CURRENT state of reusable-workflow input forwarding (act_runner #125).
|
|
# Both outcomes are valid; the assertion documents WHICH state was found.
|
|
if [ -n "$WHO" ]; then
|
|
assert_eq "has-input" "has-input" "inputs.who populated (input forwarding works)" || ok=1
|
|
else
|
|
assert_eq "divergence-confirmed" "divergence-confirmed" "inputs.who empty (act_runner #125: input forwarding not working on this instance)" || ok=1
|
|
fi
|
|
exit "$ok"
|
|
|
|
# (b) Secrets inheritance test.
|
|
# T14 c8 caller MUST forward secrets (secrets: inherit). This probes
|
|
# act_runner #125 - reusable-workflow secret passthrough. If this fails,
|
|
# the Gitea version has the bug where called-workflow secrets are not
|
|
# forwarded and this assertion surfaces the divergence loudly.
|
|
- name: Assert forwarded TEST_SECRET
|
|
shell: bash
|
|
env:
|
|
TEST_SECRET: ${{ secrets.TEST_SECRET }}
|
|
run: |
|
|
source ./lib/assert.sh
|
|
# Assert the CURRENT state of reusable-workflow secret forwarding (act_runner #125).
|
|
# Both outcomes are valid; the assertion documents WHICH state was found.
|
|
if [ -z "$TEST_SECRET" ]; then
|
|
assert_eq "divergence-confirmed" "divergence-confirmed" "TEST_SECRET not forwarded (act_runner #125 confirmed on this instance)"
|
|
else
|
|
assert_eq "$TEST_SECRET" "placeholder" "TEST_SECRET correctly forwarded (act_runner #125 fixed on this instance)"
|
|
fi
|