Fogejo Actions tests
This commit is contained in:
parent
d255395fc8
commit
7ccbeb7a46
34 changed files with 764 additions and 1 deletions
30
actions/example-if-fail/.forgejo/workflows/test.yml
Normal file
30
actions/example-if-fail/.forgejo/workflows/test.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
on: [push]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: docker
|
||||
steps:
|
||||
|
||||
- run: false
|
||||
- if: failure()
|
||||
run: echo IF TEST FAILURE
|
||||
- if: always()
|
||||
run: echo IF TEST ALWAYS
|
||||
|
||||
#
|
||||
# This is documented in GitHub Actions and does not work in Forgejo Actions
|
||||
# as of 3.0.1.
|
||||
#
|
||||
# If you have a chain of dependent jobs, failure() returns true if any ancestor job fails.
|
||||
#
|
||||
# first:
|
||||
# runs-on: docker
|
||||
# steps:
|
||||
# - run: false
|
||||
|
||||
# second:
|
||||
# runs-on: docker
|
||||
# needs: [first]
|
||||
# steps:
|
||||
# - if: failure()
|
||||
# run: echo IF TEST FAIL DEPENDS
|
4
actions/example-if-fail/run.sh
Executable file
4
actions/example-if-fail/run.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
! forgejo-test-helper.sh run_workflow actions/example-$example $url root example-$example setup-forgejo $token
|
||||
|
||||
grep --quiet 'IF TEST FAILURE' $FORGEJO_RUNNER_LOGS
|
||||
grep --quiet 'IF TEST ALWAYS' $FORGEJO_RUNNER_LOGS
|
Loading…
Add table
Reference in a new issue