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

integration tests moved to end-to-end

This commit is contained in:
Earl Warren 2023-10-29 00:37:25 +02:00
parent a521fd2935
commit 34d0f8d26e
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
33 changed files with 3 additions and 739 deletions

View file

@ -11,17 +11,13 @@ jobs:
strategy:
matrix:
info:
- version: "1.21.0-3-rc0"
- version: "1.21.0-5-rc2"
image: codeberg.org/forgejo-experimental/forgejo
# keep "cron" last otherwise it will linger and pollute the following runs
tests: "${{ vars.V1_21_TESTS || 'echo push-cancel artifacts service checkout pull-request container expression local-action docker-action if if-fail cron' }}"
- version: "1.20"
image: codeberg.org/forgejo/forgejo
tests: "${{ vars.V1_20_TESTS || 'echo checkout service container expression local-action docker-action if if-fail' }}"
steps:
- uses: actions/checkout@v3
- if: matrix.info.tests != 'none'
shell: bash
- uses: actions/checkout@v4
- shell: bash
run: |
LXC_IP_PREFIX=10.0.10 ./forgejo-dependencies.sh
export PATH=$(pwd):$PATH
@ -33,38 +29,3 @@ jobs:
echo "============================ demo ==================="
forgejo-test-helper.sh run_workflow testdata/demo $url root demo setup-forgejo $token
function run() {
local example=$1
export example
export EXAMPLE_DIR=$(pwd)/testdata/example-$example
if test -f $EXAMPLE_DIR/setup.sh ; then
echo "============================ SETUP example-$example ==================="
bash -ex $EXAMPLE_DIR/setup.sh || return 1
fi
if test -f $EXAMPLE_DIR/run.sh ; then
echo "============================ RUN example-$example ==================="
bash -ex $EXAMPLE_DIR/run.sh || return 1
else
forgejo-test-helper.sh run_workflow testdata/example-$example $url root example-$example setup-forgejo $token || return 1
fi
if test -f $EXAMPLE_DIR/teardown.sh ; then
echo "============================ TEARDOWN example-$example ==================="
bash -ex $EXAMPLE_DIR/teardown.sh || return 1
fi
}
for example in ${{ matrix.info.tests }} ; do
echo "============================ BEGIN example-$example ==================="
if ! time run $example >& /tmp/run.out ; then
cat /tmp/run.out
echo "============================ FAIL example-$example ==================="
sleep 5 # hack for Forgejo v1.21 to workaround a but by which the last lines of the output are moved to the next step
false
fi
echo "============================ END example-$example ==================="
done