From 1584ce0666ebbeb87145064e6844eea91e447190 Mon Sep 17 00:00:00 2001 From: Ugo Bechameil Date: Thu, 5 Sep 2024 20:54:36 +0200 Subject: [PATCH] add github action for triggering tests automatically on Teamcity when the PR is approved on Plugins --- .github/workflows/fake-pr-tests.yml | 18 ------------------ .../workflows/trigger-pr-tests-plugins.yml | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/fake-pr-tests.yml create mode 100644 .github/workflows/trigger-pr-tests-plugins.yml diff --git a/.github/workflows/fake-pr-tests.yml b/.github/workflows/fake-pr-tests.yml deleted file mode 100644 index f2dd9fb..0000000 --- a/.github/workflows/fake-pr-tests.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: PR tests -on: - pull_request: - types: [auto_merge_enabled] - workflow_dispatch: - -jobs: - skip: - name: Report fake success for PR tests - runs-on: ubuntu-latest - permissions: - checks: write - steps: - - uses: LouisBrunner/checks-action@v2.0.0 - with: - name: Run PR tests (Plugins) (Plugins) - conclusion: success - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/trigger-pr-tests-plugins.yml b/.github/workflows/trigger-pr-tests-plugins.yml new file mode 100644 index 0000000..b618ae1 --- /dev/null +++ b/.github/workflows/trigger-pr-tests-plugins.yml @@ -0,0 +1,19 @@ +name: Trigger PR tests (Plugins) + +on: + pull_request: + types: [auto_merge_enabled] + +jobs: + trigger-pr-tests-plugins: + name: Trigger PR tests (Plugins) + runs-on: ubuntu-latest + steps: + - name: Call TeamCity API endpoint + run: | + curl \ + -X POST \ + -H 'Authorization: Bearer ${{ secrets.TEAMCITY_TRIGGER_TESTS_TOKEN }}' \ + -H 'Content-Type: application/json' \ + -d '{"branchName": "pull/${{ github.event.number }}", "buildType": {"id": "${{ vars.TEAMCITY_BUILD_ID_FOR_TESTING_PLUGIN_PR }}"}}' \ + ${{ vars.TEAMCITY_API_URL }}/buildQueue \ No newline at end of file