on: push: branches: - 'main' - 'v*' pull_request: jobs: integration: runs-on: self-hosted strategy: matrix: info: - version: "1.21" image: codeberg.org/forgejo/forgejo - version: "1.20" image: codeberg.org/forgejo/forgejo steps: - uses: actions/checkout@v4 - shell: bash run: | LXC_IP_PREFIX=10.0.10 ./forgejo-dependencies.sh export PATH=$(pwd):$PATH forgejo.sh setup root admin1234 ${{ matrix.info.image }} ${{ matrix.info.version }} forgejo-runner.sh setup export FORGEJO_RUNNER_LOGS=forgejo-runner.log url=http://root:admin1234@$(cat forgejo-ip):3000 token=$(cat forgejo-token) echo "============================ demo ===================" forgejo-test-helper.sh run_workflow testdata/demo $url root demo setup-forgejo $token echo "============================ IPv6 ===================" forgejo-test-helper.sh run_workflow testdata/ipv6 $url root ipv6 setup-forgejo $token binary: runs-on: self-hosted strategy: matrix: - binary: https://codeberg.org/forgejo/forgejo/releases/download/v1.21.2-1/forgejo-1.21.2-1-linux-amd64 - binary: https://codeberg.org/forgejo/forgejo/releases/download/v1.20.6-1/forgejo-1.20.6-1-linux-amd64 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 chown forgejo $DIR /usr/local/bin 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