From 8ea03e8e9deb2164470a16a2fdb491882cc96208 Mon Sep 17 00:00:00 2001 From: Karolina Rakoczy Date: Thu, 10 Oct 2024 11:23:31 +0200 Subject: [PATCH] Revert "Fix false positive slack message on release (#5203)" (#5204) This reverts commit 14742dce4703f8978269effaa37fc9ef8dc62496. --- .changeset/slimy-dodos-think.md | 5 ---- ...utomation-tests-on-repository-dispatch.yml | 4 +-- .../getEnvironmentVariables.js | 4 --- .github/workflows/run-tests-on-release.yml | 30 +------------------ 4 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 .changeset/slimy-dodos-think.md diff --git a/.changeset/slimy-dodos-think.md b/.changeset/slimy-dodos-think.md deleted file mode 100644 index 3a5aab4c05b..00000000000 --- a/.changeset/slimy-dodos-think.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"saleor-dashboard": minor ---- - -Now we have slack message if there is failure when preparing instance before release tests diff --git a/.github/workflows/automation-tests-on-repository-dispatch.yml b/.github/workflows/automation-tests-on-repository-dispatch.yml index abda3bfa925..6a8382a37c1 100644 --- a/.github/workflows/automation-tests-on-repository-dispatch.yml +++ b/.github/workflows/automation-tests-on-repository-dispatch.yml @@ -1,5 +1,5 @@ name: Execute automation tests -run-name: Run tests on ${{github.event.client_payload.custom_version }} ${{github.event.client_payload.project}} +run-name: Run tests on ${{github.event.client_payload.custom_version }} ${{github.event.client_payload.project}} on: repository_dispatch: @@ -40,7 +40,7 @@ jobs: uses: ./.github/workflows/run-tests-on-release.yml with: VERSION: ${{needs.get-environment-variables.outputs.VERSION}} - CUSTOM_VERSION: ${{github.event.client_payload.custom_version }} + CUSTOM_VERSION: ${{github.event.client_payload.custom_version }} ADDITIONAL_TITLE: "Core automation test" secrets: inherit diff --git a/.github/workflows/cypressTestsHelpers/getEnvironmentVariables.js b/.github/workflows/cypressTestsHelpers/getEnvironmentVariables.js index d663fe019bd..967a02fc981 100644 --- a/.github/workflows/cypressTestsHelpers/getEnvironmentVariables.js +++ b/.github/workflows/cypressTestsHelpers/getEnvironmentVariables.js @@ -13,10 +13,6 @@ program .option("--repo_token ", "github token") .option("--project ", "release project") .action(async options => { - - if (options.version.match(/^\d+\.\d+\./)) { - throw new Error(`Incorrect version provided - ${customVersion}`); - } const isOldVersion = await checkIfOldVersion(options.version, options.repo_token); core.setOutput("IS_OLD_VERSION", isOldVersion); diff --git a/.github/workflows/run-tests-on-release.yml b/.github/workflows/run-tests-on-release.yml index bc91488432b..d1b0a07f811 100644 --- a/.github/workflows/run-tests-on-release.yml +++ b/.github/workflows/run-tests-on-release.yml @@ -15,7 +15,6 @@ on: required: false default: "Dashboard Automation test run " - secrets: STAGING_TOKEN: required: true @@ -131,32 +130,6 @@ jobs: --repo_token "$REPO_TOKEN" \ --project "$PROJECT" - - name: send slack message if failure - if: failure() - env: - LINK: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - MESSAGE: "Could not prepare instance for release tests on version ${{ env.CUSTOM_VERSION }}" - run: | - payload=$(\ - jq --null-input \ - --arg link "$LINK" \ - --arg message "$MESSAGE" \ - '{ - "attachments": [ - { - "pretext": "FAILURE", - "color": "#FE6E76", - "title": "Automation tests failure", - "title_link": $link, - "text": $message - } - ] - }' - ) - curl -H "Content-type: application/json" \ - --data "$payload" \ - -X POST ${{ secrets.SLACK_QA_STATUSES_WEBHOOK_URL }} - run-cy-tests: if: needs.add-check-and-prepare-instance.outputs.FRAMEWORK == '"cypress"' needs: add-check-and-prepare-instance @@ -257,7 +230,7 @@ jobs: tests-complete: if: | - !cancelled() && always() && needs.add-check-and-prepare-instance.result == 'success' + !cancelled() && always() needs: ["add-check-and-prepare-instance", "run-cy-tests", "run-pw-tests"] runs-on: ubuntu-22.04 timeout-minutes: 30 @@ -330,7 +303,6 @@ jobs: always() && (needs.tests-complete != 'success' && cancelled()) && needs.add-check-and-prepare-instance.outputs.FRAMEWORK == '"playwright"' - && needs.add-check-and-prepare-instance.result == 'success' steps: - uses: actions/checkout@v4