WIP: Add test for schedule not being cancelled
This commit is contained in:
parent
54f810c1df
commit
f48fa02916
3 changed files with 30 additions and 0 deletions
|
@ -0,0 +1,8 @@
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "* * * * *"
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- run: sleep 15
|
18
actions/example-schedule-noncancel/run.sh
Executable file
18
actions/example-schedule-noncancel/run.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
repo=root/example-$example
|
||||||
|
#
|
||||||
|
# push the repository
|
||||||
|
#
|
||||||
|
forgejo-test-helper.sh push_workflow actions/example-$example $url root example-$example setup-forgejo $token
|
||||||
|
sha=$(forgejo-test-helper.sh branch_tip $url $repo main)
|
||||||
|
#
|
||||||
|
# wait for the workflow (sleep infinity) to start running
|
||||||
|
#
|
||||||
|
forgejo-test-helper.sh wait_running $url $repo $sha
|
||||||
|
#
|
||||||
|
# push to the same branch
|
||||||
|
#
|
||||||
|
forgejo-test-helper.sh push_workflow actions/example-echo $url root example-$example setup-forgejo $token
|
||||||
|
#
|
||||||
|
# wait for the workflow to be canceled as a result of the previous push
|
||||||
|
#
|
||||||
|
forgejo-test-helper.sh wait_success $url $repo $sha
|
4
actions/example-schedule-noncancel/teardown.sh
Normal file
4
actions/example-schedule-noncancel/teardown.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#
|
||||||
|
# this will effectively discard any linger workflow so they do not interfere with other tests
|
||||||
|
#
|
||||||
|
forgejo-runner.sh reload
|
Loading…
Add table
Reference in a new issue