mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-05 14:55:44 +00:00
test(e2e): speed up and cover exec and Kubernetes modes (#1363)
Follow-up to https://gitea.com/gitea/runner/pulls/1362, whose crash e2e missed because it only drove the daemon on Docker. - `dispatch`, `failure_paths` and `reusable_workflow` run through the daemon and `exec`, each on Docker and one shared k3s cluster. - Fixed sleeps become gates the test releases, the job timeout uses a 15s runner deadline, k3s boots alongside Gitea, Gitea's data is on tmpfs. - Outside a container, `make test-e2e` runs `go test` in a Linux container on its own network like CI, so local runs take the same paths. Local wall time: | | Before | After | |---|---|---| | Suite | 84s | 27–35s | | `job_timeout` | 64s | 17s | | `reconnect` | 22s | 4.5s | | `capacity/serial` | 20s | 2s | | `cli_shutdown_drains` | 14s | 2.3s | | `kubernetes` | 31s | 21–23s | _Written by Claude (Opus 5.5)._ --------- Co-authored-by: bircni <[email protected]> Reviewed-on: https://gitea.com/gitea/runner/pulls/1363 Reviewed-by: bircni <[email protected]> Co-authored-by: silverwind <[email protected]>
This commit is contained in:
1 parent
2e72cf902a
commit
a46d3f3eda
23 files changed
+577
-340
No files matched your search
Vendored
+2
-2
@@ -6,12 +6,12 @@ jobs:
|
||||
steps:
|
||||
- run: |
|
||||
echo "span-start=$(date +%s%N)"
|
||||
sleep 8
|
||||
until curl -fs "${{ vars.E2E_GATE }}" > /dev/null; do sleep 0.1; done
|
||||
echo "span-end=$(date +%s%N)"
|
||||
two:
|
||||
runs-on: e2e-capacity
|
||||
steps:
|
||||
- run: |
|
||||
echo "span-start=$(date +%s%N)"
|
||||
sleep 8
|
||||
until curl -fs "${{ vars.E2E_GATE }}" > /dev/null; do sleep 0.1; done
|
||||
echo "span-end=$(date +%s%N)"
|
||||
+1
-1
@@ -6,5 +6,5 @@ jobs:
|
||||
steps:
|
||||
- run: |
|
||||
echo e2e-shutdown-started
|
||||
sleep 8
|
||||
until curl -fs "${{ vars.E2E_GATE }}" > /dev/null; do sleep 0.1; done
|
||||
echo e2e-shutdown-finished
|
||||
Vendored
-7
@@ -21,10 +21,3 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo dependent
|
||||
timeout:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 1
|
||||
steps:
|
||||
- run: |
|
||||
echo e2e-timeout-started
|
||||
sleep 300
|
||||
Vendored
+5
-2
@@ -9,7 +9,10 @@ jobs:
|
||||
steps:
|
||||
- run: |
|
||||
echo e2e-before-outage
|
||||
for i in $(seq -w 1 15); do
|
||||
i=0
|
||||
until curl -fs "${{ vars.E2E_GATE }}" > /dev/null; do
|
||||
i=$((i + 1))
|
||||
echo "tick-$i"
|
||||
sleep 1
|
||||
sleep 0.2
|
||||
done
|
||||
echo "ticks=$i"
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
name: timeout
|
||||
on: push
|
||||
jobs:
|
||||
timeout:
|
||||
runs-on: e2e-timeout
|
||||
steps:
|
||||
- run: |
|
||||
echo e2e-timeout-started
|
||||
sleep 300
|
||||
Reference in new issue
Block a user