2024-01-03 21:45:50 +01:00
on : [ pull_request, push ]
2023-03-26 17:41:37 +02:00
jobs :
integration :
runs-on : self-hosted
steps :
- uses : actions/checkout@v3
2023-05-26 14:48:58 +02:00
2023-03-26 17:41:37 +02:00
- id : forgejo
uses : https://code.forgejo.org/actions/setup-forgejo@v1
with :
2023-03-26 23:03:56 +02:00
user : testuser
2023-03-27 17:17:17 +02:00
password : admin1234
2023-09-02 07:42:49 +02:00
image-version : 1.20
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 : |
export FORGEJO_RUNNER_LOGS="${{ steps.forgejo.outputs.runner-logs }}"
2023-03-30 16:28:59 +02:00
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
2024-07-05 17:20:39 +00:00
- name : testdata/upload-download-private
run : |
export FORGEJO_RUNNER_LOGS="${{ steps.forgejo.outputs.runner-logs }}"
curl the API with the token to switch testuser to being private which should make it so the line below will create a private repo instead of a public one and run the action from it
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 : |
export FORGEJO_RUNNER_LOGS="${{ steps.forgejo.outputs.runner-logs }}"
2023-03-30 16:28:59 +02:00
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 : |
2023-03-26 17:41:37 +02:00
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