end-to-end/actions/example-push-cancel/run.sh

19 lines
620 B
Bash
Raw Normal View History

2023-10-28 22:29:04 +02:00
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
#
actions: push-cancel intermitent failure A) When both push happen within the same second, the SHA will be identical and there will not be any cancelation. B) When `sleep infinity` happens after the reload of the runner, it will block the following tests forever because it has a capacity of one. Fixes: https://code.forgejo.org/forgejo/end-to-end/issues/144 2024-05-13T00:58:49.1453499Z actions_verify_example.out:[main (root-commit) cbf3afb] initial commit 2024-05-13T00:58:49.1453528Z actions_verify_example.out: 3 files changed, 28 insertions(+) 2024-05-13T00:58:49.1453556Z actions_verify_example.out: create mode 100644 .forgejo/workflows/test.yml 2024-05-13T00:58:49.1453585Z actions_verify_example.out: create mode 100755 run.sh 2024-05-13T00:58:49.1453611Z actions_verify_example.out: create mode 100644 teardown.sh 2024-05-13T00:58:49.1453638Z actions_verify_example.out:+ git remote add origin http://root:admin1234@10.201.14.172:3000/root/example-push-cancel 2024-05-13T00:58:49.1453669Z actions_verify_example.out:+ git push --force -u origin main 2024-05-13T00:58:49.1453699Z actions_verify_example.out:remote: . Processing 1 references 2024-05-13T00:58:49.1453728Z actions_verify_example.out:remote: Processed 1 references in total 2024-05-13T00:58:49.1453758Z actions_verify_example.out:To http://10.201.14.172:3000/root/example-push-cancel 2024-05-13T00:58:49.1453786Z actions_verify_example.out: * [new branch] main -> main 2024-05-13T00:58:49.1453814Z actions_verify_example.out:branch 'main' set up to track 'origin/main'. ... 2024-05-13T00:58:49.1458629Z actions_verify_example.out:[main (root-commit) cbf3afb] initial commit 2024-05-13T00:58:49.1458656Z actions_verify_example.out: 3 files changed, 28 insertions(+) 2024-05-13T00:58:49.1458683Z actions_verify_example.out: create mode 100644 .forgejo/workflows/test.yml 2024-05-13T00:58:49.1458711Z actions_verify_example.out: create mode 100755 run.sh 2024-05-13T00:58:49.1458738Z actions_verify_example.out: create mode 100644 teardown.sh 2024-05-13T00:58:49.1458764Z actions_verify_example.out:+ git remote add origin http://root:admin1234@10.201.14.172:3000/root/example-push-cancel 2024-05-13T00:58:49.1458795Z actions_verify_example.out:+ git push --force -u origin main 2024-05-13T00:58:49.1458822Z actions_verify_example.out:Everything up-to-date
2024-05-13 19:18:33 +02:00
forgejo-test-helper.sh push_workflow actions/example-echo $url root example-$example setup-forgejo $token
2023-10-28 22:29:04 +02:00
#
2024-03-26 09:21:32 +01:00
# wait for the workflow to be canceled as a result of the previous push
2023-10-28 22:29:04 +02:00
#
forgejo-test-helper.sh wait_failure $url $repo $sha 'Has been cancelled'