083b1f36a8
Gitea Actions Compatibility Suite / aggregate (push) Successful in 0s
Gitea Actions Compatibility Suite / c8 (push) Successful in 2s
Gitea Actions Compatibility Suite / c9 (push) Successful in 58s
Gitea Actions Compatibility Suite / c10 (push) Successful in 0s
Gitea Actions Compatibility Suite / probe (push) Successful in 0s
Gitea Actions Compatibility Suite / c1 (push) Successful in 7s
Gitea Actions Compatibility Suite / c2 (push) Successful in 4s
Gitea Actions Compatibility Suite / c3 (push) Successful in 1m24s
Gitea Actions Compatibility Suite / c4 (push) Successful in 12s
Gitea Actions Compatibility Suite / c5 (push) Successful in 0s
Gitea Actions Compatibility Suite / c6 (push) Successful in 1s
Gitea Actions Compatibility Suite / c7 (push) Successful in 44s
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
64 lines
2.5 KiB
YAML
64 lines
2.5 KiB
YAML
# C9 - control-flow: timeout-minutes, continue-on-error, concurrency (parse-only)
|
|
# Reusable workflow invoked by 00-suite-runner.yml. Verifies three control-flow
|
|
# behaviors:
|
|
# 1. step-level timeout-minutes kills a runaway step (tested via continue-on-error
|
|
# so the job stays green; outcome is asserted as 'failure' to prove the
|
|
# timeout fired).
|
|
# 2. continue-on-error makes a step's conclusion 'success' despite outcome
|
|
# 'failure', verified by a dependent job.
|
|
# 3. concurrency is parsed and accepted only; actual cancellation is
|
|
# server-side and not self-asserted (see README manual checklist).
|
|
name: 09-control-flow
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
# concurrency: parse-and-accept only. Actual cancellation is server-side and NOT
|
|
# self-asserted - see README manual checklist.
|
|
concurrency:
|
|
group: cf-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
control-flow-test:
|
|
name: timeout + continue-on-error + concurrency
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# --- continue-on-error test ---
|
|
- name: tolerated failure
|
|
id: flaky
|
|
continue-on-error: true
|
|
run: exit 1
|
|
|
|
- name: assert continue-on-error outcome and conclusion
|
|
if: always()
|
|
run: |
|
|
source lib/assert.sh
|
|
assert_eq "${{ steps.flaky.outcome }}" "failure" "flaky step outcome is failure"
|
|
assert_eq "${{ steps.flaky.conclusion }}" "success" "flaky step conclusion is success (tolerated)"
|
|
|
|
# --- step-level timeout-minutes test ---
|
|
# Uses STEP-level timeout-minutes (not job-level) so a killed step
|
|
# doesn't cascade the job to failure. continue-on-error keeps the
|
|
# job green; the outcome is asserted as 'failure' to prove the
|
|
# timeout actually fired.
|
|
- name: step that should timeout
|
|
id: timeout-step
|
|
timeout-minutes: 1
|
|
continue-on-error: true
|
|
run: sleep 90
|
|
|
|
- name: assert step was killed by timeout
|
|
if: always()
|
|
run: |
|
|
source lib/assert.sh
|
|
if [ "${{ steps.timeout-step.outcome }}" == "failure" ]; then
|
|
assert_eq "timed-out" "timed-out" "step killed by timeout-minutes (outcome: ${{ steps.timeout-step.outcome }})"
|
|
else
|
|
echo "::warning::step-level timeout-minutes not enforced by this runner (outcome: ${{ steps.timeout-step.outcome }}); job-level timeout enforcement is documented in act source"
|
|
assert_eq "${{ steps.timeout-step.outcome }}" "failure" "step killed by timeout-minutes"
|
|
fi
|