mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-11-06 07:09:39 +08:00
test(e2e): cover the register/daemon CLI and failing jobs (#1346)
The e2e suite started the runner in-process and never exercised failing jobs. This adds a scenario that builds the binary and drives `register` then `daemon` against the Gitea fixture, and one for failed, skipped, continue-on-error and timed-out jobs. Verified locally against gitea/gitea:main-nightly. Assisted-by: Codet:codet Reviewed-on: https://gitea.com/gitea/runner/pulls/1346 Reviewed-by: Zettat123 <39446+zettat123@noreply.gitea.com>
This commit is contained in:
7
e2e/testdata/workflows/cli.yml
vendored
Normal file
7
e2e/testdata/workflows/cli.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
name: cli
|
||||
on: push
|
||||
jobs:
|
||||
hello:
|
||||
runs-on: e2e-cli
|
||||
steps:
|
||||
- run: echo e2e-cli-job-ran
|
||||
30
e2e/testdata/workflows/failure.yml
vendored
Normal file
30
e2e/testdata/workflows/failure.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: failure
|
||||
on: push
|
||||
jobs:
|
||||
fail:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo e2e-before-fail
|
||||
- run: exit 3
|
||||
- if: success()
|
||||
run: echo e2e-skipped-step
|
||||
- if: failure()
|
||||
run: echo e2e-failure-cleanup
|
||||
tolerated:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- continue-on-error: true
|
||||
run: exit 1
|
||||
- run: echo e2e-tolerated-next
|
||||
dependent:
|
||||
needs: fail
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo dependent
|
||||
timeout:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 1
|
||||
steps:
|
||||
- run: |
|
||||
echo e2e-timeout-started
|
||||
sleep 300
|
||||
Reference in New Issue
Block a user