2023-10-11 15:39:52 +02:00
|
|
|
name: integration
|
|
|
|
|
2023-10-15 18:18:16 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
2024-02-19 13:59:22 +01:00
|
|
|
- 'v*'
|
2023-12-23 20:00:59 +01:00
|
|
|
pull_request:
|
2023-10-11 15:39:52 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
integration:
|
|
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- id: forgejo
|
|
|
|
uses: https://code.forgejo.org/actions/setup-forgejo@v1
|
|
|
|
with:
|
|
|
|
user: root
|
|
|
|
password: admin1234
|
2023-12-23 20:00:59 +01:00
|
|
|
image: codeberg.org/forgejo/forgejo
|
|
|
|
image-version: 1.21
|
2023-10-11 15:39:52 +02:00
|
|
|
lxc-ip-prefix: 10.1.15
|
|
|
|
|
2023-10-13 22:30:22 +02:00
|
|
|
- name: tests cascading-pr
|
2023-10-11 15:39:52 +02:00
|
|
|
run: |
|
2023-10-13 22:57:51 +02:00
|
|
|
runner_config=/tmp/runner-config.yaml
|
|
|
|
sed -e 's|file: .runner|file: ${{ steps.forgejo.outputs.runner-file }}|' < tests/runner-config.yaml > $runner_config
|
2023-10-13 15:41:21 +02:00
|
|
|
FORGEJO_RUNNER_CONFIG=$runner_config forgejo-runner.sh reload
|
2023-11-01 17:28:44 +01:00
|
|
|
tests/run.sh --verbose --host_port ${{ steps.forgejo.outputs.host-port }} --url ${{ steps.forgejo.outputs.url }} --token ${{ steps.forgejo.outputs.token }}
|
|
|
|
|
|
|
|
- name: full logs
|
2023-12-23 20:00:59 +01:00
|
|
|
if: always()
|
2023-11-01 17:28:44 +01:00
|
|
|
run: |
|
|
|
|
sed -e 's/^/[RUNNER LOGS] /' ${{ steps.forgejo.outputs.runner-logs }}
|
|
|
|
docker logs forgejo | sed -e 's/^/[FORGEJO LOGS]/'
|
2023-10-13 22:30:22 +02:00
|
|
|
sleep 5 # hack to avoid mixing outputs in Forgejo v1.21
|