mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-11-27 08:40:57 -05:00
add nested test for action.yml binary support
This commit is contained in:
parent
b2ce91a593
commit
6b431ecf9b
4 changed files with 59 additions and 22 deletions
33
.forgejo/workflows/integration-action.yml
Normal file
33
.forgejo/workflows/integration-action.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'v*'
|
||||
pull_request:
|
||||
|
||||
#
|
||||
# Testing that action.yml works as intended, the other tests do not do hat.
|
||||
#
|
||||
jobs:
|
||||
integration-action:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: forgejo.sh & forgejo-runner.sh
|
||||
run: |
|
||||
LXC_IP_PREFIX=10.0.9 ./forgejo-dependencies.sh
|
||||
export PATH=$(pwd):$PATH
|
||||
forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo 1.20
|
||||
forgejo-runner.sh setup
|
||||
echo "============================ upload setup-forgejo ==================="
|
||||
forgejo-test-helper.sh push_self_action $(cat forgejo-auth-url) root setup-forgejo vTest
|
||||
- name: lxc-run-forgejo-binary
|
||||
run: |
|
||||
export PATH=$(pwd):$PATH
|
||||
export FORGEJO_RUNNER_LOGS=forgejo-runner.log
|
||||
forgejo-test-helper.sh run_workflow testdata/lxc-run-forgejo-binary $(cat forgejo-auth-url) root lxc-run-forgejo-binary setup-forgejo $(cat forgejo-token)
|
||||
- name: lxc-run-forgejo-oci
|
||||
run: |
|
||||
export PATH=$(pwd):$PATH
|
||||
export FORGEJO_RUNNER_LOGS=forgejo-runner.log
|
||||
forgejo-test-helper.sh run_workflow testdata/lxc-run-forgejo-oci $(cat forgejo-auth-url) root lxc-run-forgejo-oci setup-forgejo $(cat forgejo-token)
|
|
@ -1,22 +0,0 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'v*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
integration-nested:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: |
|
||||
set -x
|
||||
LXC_IP_PREFIX=10.0.9 ./forgejo-dependencies.sh
|
||||
export PATH=$(pwd):$PATH
|
||||
forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo 1.20
|
||||
forgejo-runner.sh setup
|
||||
export FORGEJO_RUNNER_LOGS=forgejo-runner.log
|
||||
echo "============================ sanity-check ==================="
|
||||
forgejo-test-helper.sh push_self_action http://root:admin1234@$(cat forgejo-ip):3000 root setup-forgejo vTest
|
||||
forgejo-test-helper.sh run_workflow testdata/sanity-checks http://root:admin1234@$(cat forgejo-ip):3000 root sanity-check setup-forgejo $(cat forgejo-token)
|
26
testdata/lxc-run-forgejo-binary/.forgejo/workflows/test.yml
vendored
Normal file
26
testdata/lxc-run-forgejo-binary/.forgejo/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
on: [push]
|
||||
jobs:
|
||||
setup-binary:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- run: |
|
||||
echo +++++++++++++++++++++++++++++++++++++++++++
|
||||
echo about to actions/checkout@v3 for SELF@vTest
|
||||
- uses: actions/checkout@v3
|
||||
- id: forgejo
|
||||
uses: SELF@vTest
|
||||
with:
|
||||
binary: https://codeberg.org/forgejo/forgejo/releases/download/v1.20.6-1/forgejo-1.20.6-1-linux-amd64
|
||||
- run: |
|
||||
echo +++++++++++++++++++++++++++++++++++++++++++
|
||||
echo sanity checking the reset of setup-forgejo
|
||||
set -ex
|
||||
test "${{ steps.forgejo.outputs.token }}"
|
||||
test "FORGEJO_TOKEN" -a "FORGEJO_TOKEN" != F'O'RGEJO_TOKEN
|
||||
curl ${{ steps.forgejo.outputs.url }}/api/forgejo/v1/version >& version.out
|
||||
if ! grep --quiet 1.20 version.out ; then
|
||||
cat version.out
|
||||
exit 1
|
||||
fi
|
||||
test -f ${{ steps.forgejo.outputs.runner-file }}
|
Loading…
Reference in a new issue