2023-10-15 17:59:57 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
- 'v*'
|
2023-10-29 00:52:53 +02:00
|
|
|
pull_request:
|
2023-07-08 14:06:13 +02:00
|
|
|
|
2023-03-24 15:59:04 +01:00
|
|
|
jobs:
|
|
|
|
integration:
|
2024-12-06 17:11:41 +00:00
|
|
|
runs-on: lxc-bookworm
|
2023-09-24 20:32:40 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
info:
|
2025-01-15 12:36:05 +01:00
|
|
|
- version: "7.0"
|
2023-12-02 21:37:56 +01:00
|
|
|
image: codeberg.org/forgejo/forgejo
|
2025-01-15 12:36:05 +01:00
|
|
|
- version: "9.0"
|
2023-09-24 20:32:40 +02:00
|
|
|
image: codeberg.org/forgejo/forgejo
|
2023-03-24 15:59:04 +01:00
|
|
|
steps:
|
2023-10-29 00:37:25 +02:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- shell: bash
|
2023-09-29 20:19:00 +02:00
|
|
|
run: |
|
2023-05-29 17:12:23 +02:00
|
|
|
LXC_IP_PREFIX=10.0.10 ./forgejo-dependencies.sh
|
2023-09-24 16:54:52 +02:00
|
|
|
export PATH=$(pwd):$PATH
|
2023-09-24 20:32:40 +02:00
|
|
|
forgejo.sh setup root admin1234 ${{ matrix.info.image }} ${{ matrix.info.version }}
|
|
|
|
forgejo-runner.sh setup
|
2023-03-29 15:23:09 +02:00
|
|
|
export FORGEJO_RUNNER_LOGS=forgejo-runner.log
|
2023-10-07 23:27:24 +02:00
|
|
|
url=http://root:admin1234@$(cat forgejo-ip):3000
|
|
|
|
token=$(cat forgejo-token)
|
2023-09-02 16:21:10 +02:00
|
|
|
|
2023-10-04 18:11:42 +02:00
|
|
|
echo "============================ demo ==================="
|
2023-10-07 23:27:24 +02:00
|
|
|
forgejo-test-helper.sh run_workflow testdata/demo $url root demo setup-forgejo $token
|
2023-12-02 21:37:56 +01:00
|
|
|
echo "============================ IPv6 ==================="
|
|
|
|
forgejo-test-helper.sh run_workflow testdata/ipv6 $url root ipv6 setup-forgejo $token
|
2023-12-17 22:22:55 +01:00
|
|
|
|
|
|
|
binary:
|
2024-12-06 17:11:41 +00:00
|
|
|
runs-on: lxc-bookworm
|
2023-12-17 22:22:55 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
- binary: https://codeberg.org/forgejo/forgejo/releases/download/v1.21.2-1/forgejo-1.21.2-1-linux-amd64
|
2023-12-17 23:35:54 +01:00
|
|
|
- binary: https://codeberg.org/forgejo/forgejo/releases/download/v1.20.6-1/forgejo-1.20.6-1-linux-amd64
|
2023-12-17 22:22:55 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- shell: bash
|
|
|
|
run: |
|
|
|
|
set -x
|
|
|
|
export DIR=$(mktemp -d)
|
|
|
|
export PATH=$(pwd):$PATH
|
|
|
|
LXC_IP_PREFIX=10.0.10 forgejo-dependencies.sh
|
|
|
|
|
|
|
|
forgejo-binary.sh ensure_user forgejo
|
2023-12-20 22:22:14 +01:00
|
|
|
chown forgejo $DIR
|
2023-12-17 22:22:55 +01:00
|
|
|
su -c "DIR=$DIR bash -x forgejo-binary.sh setup root admin1234 ${{ matrix.binary }}" forgejo
|
|
|
|
|
|
|
|
su -c "DIR=$DIR bash -x forgejo-runner.sh setup" forgejo
|
|
|
|
export FORGEJO_RUNNER_LOGS=$DIR/forgejo-runner.log
|
|
|
|
url=$(cat $DIR/forgejo-auth-url)
|
|
|
|
token=$(cat $DIR/forgejo-token)
|
|
|
|
|
|
|
|
echo "============================ demo ==================="
|
|
|
|
FORGEJO_RUNNER_DIR=$DIR forgejo-test-helper.sh run_workflow testdata/demo $url root demo setup-forgejo $token
|
|
|
|
|
|
|
|
su -c "DIR=$DIR forgejo-binary.sh teardown" forgejo
|
|
|
|
|
|
|
|
echo "============================ verify zip downloading ==================="
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
apt -q install -qq -y zip
|
|
|
|
mv $DIR/forgejo /tmp/forgejo
|
|
|
|
( cd /tmp ; zip forgejo.zip forgejo )
|
|
|
|
forgejo-binary.sh download file:///tmp/forgejo.zip
|
|
|
|
cmp --quiet /tmp/forgejo $DIR/forgejo
|