From 93978d8ec0a675c6712315ece8f862186e99fca4 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Mon, 3 Apr 2023 08:59:41 +0200 Subject: [PATCH] release integration tests --- .forgejo/workflows/integration.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.forgejo/workflows/integration.yml b/.forgejo/workflows/integration.yml index 6e537cc..bbb7bee 100644 --- a/.forgejo/workflows/integration.yml +++ b/.forgejo/workflows/integration.yml @@ -1,8 +1,10 @@ -name: Test the release process +name: Integration tests for the release process on: - pull_request: - paths: '.forgejo/workflows/release.yml' + push: + paths: + - .forgejo/workflows/release.yml + - .forgejo/workflows/integration.yml jobs: release-simulation: @@ -16,9 +18,7 @@ jobs: user: root password: admin1234 image-version: 1.19 - - - run: | - LXC_IP_PREFIX=10.0.9 forgejo-dependencies.sh + lxc-ip-prefix: 10.0.9 - name: publish the runner release run: | @@ -34,18 +34,18 @@ jobs: # Create a new project with the runner and the release workflow only # rsync -a --exclude .git ./ $dir/ - rm $(find $dir/.forgejo/workflows | grep -v release.yml) - forgejo-test-helper.sh push $dir $url root runner - sha=$(git -C $dir rev-parse HEAD) + rm $(find $dir/.forgejo/workflows/*.yml | grep -v release.yml) + forgejo-test-helper.sh push $dir $url root runner |& tee $dir/pushed + eval $(grep '^sha=' < $dir/pushed) # # Push a tag to trigger the release workflow and wait for it to complete # forgejo-test-helper.sh api POST $url repos/root/runner/tags ${{ steps.forgejo.outputs.token }} --data-raw '{"tag_name": "v1.2.3", "target": "'$sha'"}' - forgejo-test-helper.sh wait_success "$url" root/runner $sha + LOOPS=180 forgejo-test-helper.sh wait_success "$url" root/runner $sha # # Minimal sanity checks. e2e test is for the setup-forgejo action # and the infrastructure playbook. # - curl -sS $url/root/runner/releases/download/v1.2.3/runner-1.2.3-amd64 > /dev/null + curl -sS $url/root/runner/releases/download/v1.2.3/forgejo-runner-amd64 > /dev/null