forgejo-release/.forgejo/workflows/integration.yml

66 lines
3 KiB
YAML
Raw Normal View History

2024-01-03 21:45:50 +01:00
on: [ pull_request, push ]
jobs:
integration:
runs-on: self-hosted
steps:
2025-04-13 08:31:08 +00:00
- uses: actions/checkout@v4
2023-05-26 14:48:58 +02:00
- id: forgejo
Update https://code.forgejo.org/actions/setup-forgejo action to v3.0.1 (#61) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [https://code.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | patch | `v3.0.0` -> `v3.0.1` | --- ### Release Notes <details> <summary>actions/setup-forgejo (https://code.forgejo.org/actions/setup-forgejo)</summary> ### [`v3.0.1`](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.0...v3.0.1) [Compare Source](https://code.forgejo.org/actions/setup-forgejo/compare/v3.0.0...v3.0.1) </details> --- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4yMy4yIiwidXBkYXRlZEluVmVyIjoiNDEuMjMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/61 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org> Co-authored-by: Renovate Bot <bot@kriese.eu> Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-07-08 06:25:03 +00:00
uses: https://code.forgejo.org/actions/setup-forgejo@v3.0.1
with:
2023-03-26 23:03:56 +02:00
user: testuser
2023-03-27 17:17:17 +02:00
password: admin1234
image-version: 9
2023-03-30 17:27:35 +02:00
2023-09-02 07:42:49 +02:00
- name: push self
2023-03-27 17:17:17 +02:00
run: |
2023-03-29 17:16:26 +02:00
forgejo-test-helper.sh push_self_action http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser forgejo-release vTest
2023-03-30 17:27:35 +02:00
2023-09-02 07:42:49 +02:00
- name: testdata/upload-download
2023-03-30 17:27:35 +02:00
run: |
2024-11-18 11:10:44 +01:00
export LOOP_DELAY=30
2023-03-30 17:27:35 +02:00
export FORGEJO_RUNNER_LOGS="${{ steps.forgejo.outputs.runner-logs }}"
forgejo-test-helper.sh run_workflow testdata/upload-download http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser upload-download forgejo-release "${{ steps.forgejo.outputs.token }}"
2023-03-30 17:27:35 +02:00
set -ex
export FORGEJO="${{ steps.forgejo.outputs.url }}"
curl --fail -sS $FORGEJO/api/v1/repos/testuser/upload-download/releases/tags/v2.0 > /tmp/v2.json
EXPECTED='No shell expansion should on these notes:
- $(some_command)
- `other_commend`
- "double quoted" and '\''single quoted'\'' strings
- \backslash escape
- !exclamation_mark'
test "$EXPECTED" = "$(jq -r .body < /tmp/v2.json)"
test $(cat /tmp/v2.json | jq -r .hide_archive_links) = false
2024-11-18 11:31:53 +01:00
curl --fail -sS $FORGEJO/api/v1/repos/testuser/upload-download/releases/tags/v1.0 > /tmp/v1.json
cat /tmp/v1.json | jq -r .body | grep '<!--start release-notes-assistant-->'
test $(cat /tmp/v1.json | jq -r .hide_archive_links) = true
- name: testdata/upload-download-private
run: |
2024-11-18 11:10:44 +01:00
export LOOP_DELAY=30
export FORGEJO_RUNNER_LOGS="${{ steps.forgejo.outputs.runner-logs }}"
curl -X 'POST' 'http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }}/api/v1/user/repos' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"name": "upload-download-private","private": true}'
forgejo-test-helper.sh run_workflow testdata/upload-download http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser upload-download-private forgejo-release "${{ steps.forgejo.outputs.token }}"
2023-09-02 07:42:49 +02:00
- name: testdata/nested-upload-download
2023-03-30 17:27:35 +02:00
run: |
2024-11-18 11:10:44 +01:00
export LOOP_DELAY=30
2023-03-30 17:27:35 +02:00
export FORGEJO_RUNNER_LOGS="${{ steps.forgejo.outputs.runner-logs }}"
forgejo-test-helper.sh run_workflow testdata/nested-upload-download http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser nested-upload-download forgejo-release "${{ steps.forgejo.outputs.token }}"
2023-03-30 17:27:35 +02:00
2023-09-02 07:42:49 +02:00
- name: test forgejo-release.sh
2023-03-27 17:17:17 +02:00
run: |
set -ex
2023-03-26 23:03:56 +02:00
export FORGEJO="${{ steps.forgejo.outputs.url }}"
2023-03-30 01:08:18 +02:00
export TOKEN="${{ steps.forgejo.outputs.token }}"
export VERBOSE=true
testdata/forgejo-release-test.sh test_run testuser otherrepo
2023-09-02 10:48:52 +02:00
- if: failure()
run: docker logs forgejo