1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-forgejo synced 2025-06-08 03:58:19 +02:00

example: pull-request events

This commit is contained in:
Earl Warren 2023-09-26 21:53:30 +02:00
parent a80989ce28
commit 356d879c4d
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
9 changed files with 249 additions and 5 deletions

View file

@ -6,9 +6,9 @@ jobs:
strategy:
matrix:
info:
- version: "1.21.0-0-rc0"
- version: "1.21.0-1-rc0"
image: codeberg.org/forgejo-experimental/forgejo
tests: "echo cron service container expression local-action docker-action if if-fail"
tests: "echo cron pull-request service container expression local-action docker-action if if-fail"
- version: "1.20"
image: codeberg.org/forgejo/forgejo
tests: "echo service container expression local-action docker-action if if-fail"
@ -31,15 +31,16 @@ jobs:
export FORGEJO_RUNNER_LOGS=forgejo-runner.log
for example in ${{ matrix.info.tests }} ; do
export example
export EXAMPLE_DIR=$(pwd)/testdata/example-$example
if test -f $EXAMPLE_DIR/setup.sh ; then
source $EXAMPLE_DIR/setup.sh
$EXAMPLE_DIR/setup.sh
fi
echo "============================ BEGIN example-$example ==================="
if test -f $EXAMPLE_DIR/run.sh ; then
source $EXAMPLE_DIR/run.sh
$EXAMPLE_DIR/run.sh
else
if ! forgejo-test-helper.sh run_workflow testdata/example-$example http://root:admin1234@$(cat forgejo-ip):3000 root example-$example setup-forgejo $(cat forgejo-token) >& /tmp/run.out ; then
cat /tmp/run.out
@ -49,7 +50,7 @@ jobs:
echo "============================ END example-$example ==================="
if test -f $EXAMPLE_DIR/teardown.sh ; then
source $EXAMPLE_DIR/teardown.sh
$EXAMPLE_DIR/teardown.sh
fi
done
echo "============================ demo ==================="