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
This commit is contained in:
Earl Warren 2024-05-13 19:18:33 +02:00
parent 888ddb992c
commit 9f55d67bd2
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -11,7 +11,7 @@ forgejo-test-helper.sh wait_running $url $repo $sha
# #
# push to the same branch # push to the same branch
# #
forgejo-test-helper.sh push_workflow actions/example-$example $url root example-$example setup-forgejo $token 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 # wait for the workflow to be canceled as a result of the previous push
# #