Fogejo Actions tests

This commit is contained in:
Earl Warren 2023-10-28 22:29:04 +02:00
parent d255395fc8
commit 7ccbeb7a46
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
34 changed files with 764 additions and 1 deletions

View file

@ -0,0 +1,6 @@
on: [push]
jobs:
test:
runs-on: docker
steps:
- run: sleep infinity

View 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-$example $url root example-$example setup-forgejo $token
#
# wait for the workflow to be canceld as a result of the previous push
#
forgejo-test-helper.sh wait_failure $url $repo $sha 'Has been cancelled'

View file

@ -0,0 +1,4 @@
#
# this will effectively discard any linger workflow so they do not interfere with other tests
#
forgejo-runner.sh reload