From 6207afdf03a5167e95ba4d3cf955fce87044cc2f Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Thu, 27 Jun 2024 16:12:59 -0300 Subject: [PATCH] fix: PR update E2E tests problems (#15603) --- .github/actions/cache-db/action.yml | 3 ++- .github/workflows/pr.yml | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/actions/cache-db/action.yml b/.github/actions/cache-db/action.yml index 3e4ff42ad7..f1b519f23f 100644 --- a/.github/actions/cache-db/action.yml +++ b/.github/actions/cache-db/action.yml @@ -17,6 +17,7 @@ runs: cache-name: cache-db key-1: ${{ hashFiles('packages/prisma/schema.prisma', 'packages/prisma/migrations/**/**.sql', 'packages/prisma/*.ts') }} key-2: ${{ github.event.pull_request.number || github.ref }} + key-3: ${{ github.event.pull_request.head.sha }} DATABASE_URL: ${{ inputs.DATABASE_URL }} DATABASE_DIRECT_URL: ${{ inputs.DATABASE_URL }} E2E_TEST_CALCOM_QA_EMAIL: ${{ inputs.E2E_TEST_CALCOM_QA_EMAIL }} @@ -24,7 +25,7 @@ runs: E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS: ${{ inputs.E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS }} with: path: ${{ inputs.path }} - key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ env.key-2 }} + key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }} - run: echo ${{ env.E2E_TEST_CALCOM_QA_GCAL_CREDENTIALS }} && yarn db-seed if: steps.cache-db.outputs.cache-hit != 'true' shell: bash diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4b7f069dd1..1396819073 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -105,13 +105,6 @@ jobs: uses: ./.github/workflows/unit-tests.yml secrets: inherit - integration-test: - name: Tests - needs: [changes, check-label] - if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }} - uses: ./.github/workflows/integration-tests.yml - secrets: inherit - build-api-v1: name: Production builds needs: [changes, check-label] @@ -133,30 +126,37 @@ jobs: uses: ./.github/workflows/production-build-without-database.yml secrets: inherit + integration-test: + name: Tests + needs: [changes, check-label, build, build-api-v1, build-api-v2] + if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }} + uses: ./.github/workflows/integration-tests.yml + secrets: inherit + e2e: name: Tests - needs: [changes, check-label, build] + needs: [changes, check-label, build, build-api-v1, build-api-v2] if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} uses: ./.github/workflows/e2e.yml secrets: inherit e2e-app-store: name: Tests - needs: [changes, check-label, build] + needs: [changes, check-label, build, build-api-v1, build-api-v2] if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} uses: ./.github/workflows/e2e-app-store.yml secrets: inherit e2e-embed: name: Tests - needs: [changes, check-label, build] + needs: [changes, check-label, build, build-api-v1, build-api-v2] if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} uses: ./.github/workflows/e2e-embed.yml secrets: inherit e2e-embed-react: name: Tests - needs: [changes, check-label, build] + needs: [changes, check-label, build, build-api-v1, build-api-v2] if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} uses: ./.github/workflows/e2e-embed-react.yml secrets: inherit