test: add end-to-end Gitea compatibility suite (#1180)

Adds a real-Gitea compatibility suite against stable and nightly to catch runner and API drift before release.

The suite shares one Gitea and regular runner, using repository runners only for cache v1/v2 and ephemeral behavior. It covers registration, payload and log encoding, secrets, variables, services, artifacts, outputs, matrices, cache, dispatch, live logs, cancellation, and ephemeral teardown.

CI runs both images in parallel. Warm local timings:

| Image | Before | After |
| --- | ---: | ---: |
| `gitea/gitea:latest` | ~70s | 26.54s |
| `gitea/gitea:main-nightly` | ~54s | 22.53s |

The former serial matrix took about 2 minutes. Parallel suite execution is now bounded by the slower ~26.5-second variant.

Shared Renovate matcher: https://gitea.com/gitea/renovate-config/pulls/552

---------

Co-authored-by: silverwind <me@silverwind.io>
Reviewed-on: https://gitea.com/gitea/runner/pulls/1180
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com>
Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni
2026-08-23 12:32:22 +00:00
committed by silverwind
parent b97c61aa14
commit 8260e2def2
25 changed files with 1370 additions and 120 deletions
+26
View File
@@ -0,0 +1,26 @@
name: cache
on: push
jobs:
save:
runs-on: e2e-cache
steps:
- run: |
mkdir -p cached
echo "cached-payload" > cached/data.txt
- uses: actions/cache@v4
with:
path: cached
key: e2e-cache-${{ github.run_id }}
restore:
needs: save
runs-on: e2e-cache
steps:
- uses: actions/cache@v4
id: restore
with:
path: cached
key: e2e-cache-${{ github.run_id }}
- run: |
echo "cache-hit=${{ steps.restore.outputs.cache-hit }}"
test "${{ steps.restore.outputs.cache-hit }}" = "true"
grep -q cached-payload cached/data.txt
+9
View File
@@ -0,0 +1,9 @@
name: cancel
on: push
jobs:
slow:
runs-on: ubuntu-latest
steps:
- run: |
echo e2e-live-log-marker
timeout 2s tail -f /dev/null || true
+11
View File
@@ -0,0 +1,11 @@
name: dispatch
on:
workflow_dispatch:
inputs:
subject:
required: true
jobs:
greet:
runs-on: ubuntu-latest
steps:
- run: test "${{ inputs.subject }}" = dispatch-input-value
+7
View File
@@ -0,0 +1,7 @@
name: ephemeral
on: push
jobs:
hello:
runs-on: e2e-ephemeral
steps:
- run: echo hello
+53
View File
@@ -0,0 +1,53 @@
name: payloads
on: push
jobs:
verify:
runs-on: ubuntu-latest
services:
web:
image: ${{ vars.E2E_SERVICE_IMAGE }}
steps:
- run: |
echo 'plain-100%-done;-[bracket]'
printf 'multiline-first\nmultiline-second\n'
echo '::notice::notice-payload-here'
echo '::warning::warning-payload-here'
echo '::error::error-payload-here'
echo '::group::group-payload-here'
echo 'inside-the-group'
echo '::endgroup::'
echo '::notice::encoded-first%0Aencoded-second'
echo "the variable is ${{ vars.GREETING }}"
echo "the secret is ${{ secrets.FOO }}"
curl --connect-timeout 1 --max-time 2 --retry 30 --retry-delay 1 --retry-max-time 30 --retry-all-errors -fsS -o /dev/null http://web/
produce:
runs-on: ubuntu-latest
outputs:
token: ${{ steps.emit.outputs.token }}
steps:
- id: emit
run: echo "token=produced-value-42" >> "$GITHUB_OUTPUT"
- run: echo "artifact content" > payload.txt
- uses: actions/upload-artifact@v4
with:
name: payload
path: payload.txt
consume:
needs: produce
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: payload
- run: grep -q 'artifact content' payload.txt
- run: |
echo "received=${{ needs.produce.outputs.token }}"
test "${{ needs.produce.outputs.token }}" = "produced-value-42"
cell:
runs-on: ubuntu-latest
strategy:
matrix:
letter: [a, b]
number: [1, 2]
steps:
- run: echo "cell-${{ matrix.letter }}-${{ matrix.number }}"