dd33709de4
Gitea Actions Compatibility Suite / aggregate (push) Failing after 0s
Gitea Actions Compatibility Suite / probe (push) Successful in 1s
Gitea Actions Compatibility Suite / c1 (push) Failing after 3s
Gitea Actions Compatibility Suite / c2 (push) Failing after 2s
Gitea Actions Compatibility Suite / c3 (push) Successful in 1m23s
Gitea Actions Compatibility Suite / c4 (push) Failing after 8s
Gitea Actions Compatibility Suite / c5 (push) Failing after 1s
Gitea Actions Compatibility Suite / c6 (push) Successful in 1s
Gitea Actions Compatibility Suite / c7 (push) Failing after 0s
Gitea Actions Compatibility Suite / c8 (push) Failing after 0s
Gitea Actions Compatibility Suite / c9 (push) Failing after 0s
Gitea Actions Compatibility Suite / c10 (push) Failing after 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
68 lines
2.5 KiB
YAML
68 lines
2.5 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
|
|
# inputs.who must reach this job non-empty (caller forwarding).
|
|
if [ -n "$WHO" ]; then
|
|
assert_eq "has-input" "has-input" "inputs.who populated" || ok=1
|
|
else
|
|
printf '[FAIL] inputs.who is empty; caller did not forward the input\n' >&2
|
|
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: |
|
|
# shellcheck disable=SC1091
|
|
source ./lib/assert.sh
|
|
assert_eq "$TEST_SECRET" "placeholder" "reusable workflow received forwarded TEST_SECRET"
|