From 48958da2317f82ddab2bd1d7a25328422770c1c9 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 6 Oct 2023 07:45:13 +0200 Subject: [PATCH] restore workflows accidentally removed resurected from https://code.forgejo.org/actions/setup-forgejo/pulls/54/files --- .forgejo/workflows/forgejo.sh | 28 +++++++++++++++++++++++ .forgejo/workflows/integration-nested.yml | 24 +++++++++++++++++++ .forgejo/workflows/integration.yml | 2 +- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/forgejo.sh create mode 100644 .forgejo/workflows/integration-nested.yml diff --git a/.forgejo/workflows/forgejo.sh b/.forgejo/workflows/forgejo.sh new file mode 100644 index 0000000..8cbdc28 --- /dev/null +++ b/.forgejo/workflows/forgejo.sh @@ -0,0 +1,28 @@ +on: + push: + paths: + - forgejo.sh + - .forgejo/workflows/forgejo-sh.yml + pull_request: + paths: + - forgejo.sh + - .forgejo/workflows/forgejo-sh.yml + +jobs: + forgejo-sh: + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + - run: | + set -x + export PATH=$(pwd):$PATH + forgejo-dependencies.sh install_docker + ( + echo codeberg.org/forgejo/forgejo 1.19.4-0 + echo codeberg.org/forgejo/forgejo 1.20.4-1 + echo codeberg.org/forgejo-experimental/forgejo 1.21.0-2-rc0 + ) | while read url version ; do + echo "=========================== launching forgejo v$version ==========" + forgejo.sh setup root admin1234 $url $version + forgejo.sh teardown + done diff --git a/.forgejo/workflows/integration-nested.yml b/.forgejo/workflows/integration-nested.yml new file mode 100644 index 0000000..de771a4 --- /dev/null +++ b/.forgejo/workflows/integration-nested.yml @@ -0,0 +1,24 @@ +on: [ push, pull_request ] +jobs: + integration-nested: + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + - run: | + set -x + LXC_IP_PREFIX=10.0.9 ./forgejo-dependencies.sh + export PATH=$(pwd):$PATH + forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo 1.20 + # + # Uncomment the following for a shortcut to debugging the Forgejo runner. + # It will build the runner from a designated repository and branch instead of + # downloading it from a canonical release. + # + # ./forgejo-test-helper.sh build_runner http://code.forgejo.org/forgejo/runner branch-under-debug + # export PATH=$(pwd)/forgejo-runner:$PATH + # + ./forgejo-runner.sh setup + export FORGEJO_RUNNER_LOGS=forgejo-runner.log + echo "============================ sanity-check ===================" + ./forgejo-test-helper.sh push_self_action http://root:admin1234@$(cat forgejo-ip):3000 root setup-forgejo vTest + ./forgejo-test-helper.sh run_workflow testdata/sanity-checks http://root:admin1234@$(cat forgejo-ip):3000 root sanity-check setup-forgejo $(cat forgejo-token) diff --git a/.forgejo/workflows/integration.yml b/.forgejo/workflows/integration.yml index 798e275..05bf9fa 100644 --- a/.forgejo/workflows/integration.yml +++ b/.forgejo/workflows/integration.yml @@ -9,7 +9,7 @@ jobs: - version: "1.21.0-2-rc0" image: codeberg.org/forgejo-experimental/forgejo # keep "cron" last otherwise it will linger and pollute the following runs - tests: "${{ vars.V120_TESTS || 'echo artifacts service checkout pull-request container expression local-action docker-action if if-fail cron' }}" + tests: "${{ vars.V121_TESTS || 'echo artifacts service checkout pull-request container expression local-action docker-action if if-fail cron' }}" - version: "1.20" image: codeberg.org/forgejo/forgejo tests: "${{ vars.V120_TESTS || 'echo checkout service container expression local-action docker-action if if-fail' }}"