mirror of https://code.forgejo.org/forgejo/runner
release integration tests
parent
8834728285
commit
93978d8ec0
|
@ -1,8 +1,10 @@
|
||||||
name: Test the release process
|
name: Integration tests for the release process
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
push:
|
||||||
paths: '.forgejo/workflows/release.yml'
|
paths:
|
||||||
|
- .forgejo/workflows/release.yml
|
||||||
|
- .forgejo/workflows/integration.yml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release-simulation:
|
release-simulation:
|
||||||
|
@ -16,9 +18,7 @@ jobs:
|
||||||
user: root
|
user: root
|
||||||
password: admin1234
|
password: admin1234
|
||||||
image-version: 1.19
|
image-version: 1.19
|
||||||
|
lxc-ip-prefix: 10.0.9
|
||||||
- run: |
|
|
||||||
LXC_IP_PREFIX=10.0.9 forgejo-dependencies.sh
|
|
||||||
|
|
||||||
- name: publish the runner release
|
- name: publish the runner release
|
||||||
run: |
|
run: |
|
||||||
|
@ -34,18 +34,18 @@ jobs:
|
||||||
# Create a new project with the runner and the release workflow only
|
# Create a new project with the runner and the release workflow only
|
||||||
#
|
#
|
||||||
rsync -a --exclude .git ./ $dir/
|
rsync -a --exclude .git ./ $dir/
|
||||||
rm $(find $dir/.forgejo/workflows | grep -v release.yml)
|
rm $(find $dir/.forgejo/workflows/*.yml | grep -v release.yml)
|
||||||
forgejo-test-helper.sh push $dir $url root runner
|
forgejo-test-helper.sh push $dir $url root runner |& tee $dir/pushed
|
||||||
sha=$(git -C $dir rev-parse HEAD)
|
eval $(grep '^sha=' < $dir/pushed)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Push a tag to trigger the release workflow and wait for it to complete
|
# 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 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
|
# Minimal sanity checks. e2e test is for the setup-forgejo action
|
||||||
# and the infrastructure playbook.
|
# 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
|
||||||
|
|
Loading…
Reference in New Issue