release integration tests

pull/11/head
Earl Warren 2023-04-03 08:59:41 +02:00
parent 8834728285
commit 93978d8ec0
No known key found for this signature in database
GPG Key ID: 0579CB2928A78A00
1 changed files with 11 additions and 11 deletions

View File

@ -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