From 7ae0d6b7cc8584065f6732b99f0c02b709006491 Mon Sep 17 00:00:00 2001 From: Lauris Skraucis Date: Fri, 22 Aug 2025 16:32:19 +0200 Subject: [PATCH] refactor: run atoms e2e when e2e label added (#23281) * refactor: run atoms e2e when e2e label added * refactor: rename atoms-e2e to e2e-atoms --- .github/workflows/all-checks.yml | 8 +++++++- .../workflows/{atoms-e2e.yml => e2e-atoms.yml} | 16 ++++------------ .github/workflows/pr.yml | 10 +++++++++- 3 files changed, 20 insertions(+), 14 deletions(-) rename .github/workflows/{atoms-e2e.yml => e2e-atoms.yml} (83%) diff --git a/.github/workflows/all-checks.yml b/.github/workflows/all-checks.yml index 8d033f754c..34ab40d3f6 100644 --- a/.github/workflows/all-checks.yml +++ b/.github/workflows/all-checks.yml @@ -74,8 +74,14 @@ jobs: uses: ./.github/workflows/e2e-embed-react.yml secrets: inherit + e2e-atoms: + name: Tests + needs: [lint, build, build-atoms, build-api-v2] + uses: ./.github/workflows/e2e-atoms.yml + secrets: inherit + required: - needs: [lint, type-check, unit-test, integration-test, build, build-api-v1, build-api-v2, e2e, e2e-embed, e2e-embed-react, e2e-app-store] + needs: [lint, type-check, unit-test, integration-test, build, build-api-v1, build-api-v2, e2e, e2e-embed, e2e-embed-react, e2e-app-store, e2e-atoms] if: always() runs-on: buildjet-2vcpu-ubuntu-2204 steps: diff --git a/.github/workflows/atoms-e2e.yml b/.github/workflows/e2e-atoms.yml similarity index 83% rename from .github/workflows/atoms-e2e.yml rename to .github/workflows/e2e-atoms.yml index 87d64e1555..9e4e2af67e 100644 --- a/.github/workflows/atoms-e2e.yml +++ b/.github/workflows/e2e-atoms.yml @@ -1,15 +1,7 @@ name: Atoms E2E Tests on: - pull_request: - branches: - - main - paths: - - 'packages/platform/atoms/**' - - 'packages/platform/examples/base/**' - - 'apps/api/v2/**' - - '.github/workflows/atoms-e2e.yml' - + workflow_call: permissions: actions: write contents: read @@ -25,7 +17,7 @@ env: DATABASE_URL: ${{ secrets.CI_DATABASE_URL }} jobs: - atoms-e2e: + e2e-atoms: timeout-minutes: 15 name: Atoms E2E Tests runs-on: buildjet-4vcpu-ubuntu-2204 @@ -45,13 +37,13 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: atoms-e2e-test-results + name: e2e-atoms-test-results path: test-results retention-days: 7 - name: Upload Playwright Report uses: actions/upload-artifact@v4 if: always() with: - name: atoms-e2e-playwright-report + name: e2e-atoms-playwright-report path: playwright-report retention-days: 7 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b7dc3afd9c..e9f983df1a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -195,6 +195,13 @@ jobs: uses: ./.github/workflows/e2e-embed-react.yml secrets: inherit + e2e-atoms: + name: Tests + needs: [changes, check-label, build, build-atoms, build-api-v2] + if: ${{ needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} + uses: ./.github/workflows/e2e-atoms.yml + secrets: inherit + analyze: name: Analyze Build needs: [build] @@ -204,7 +211,7 @@ jobs: merge-reports: name: Merge reports if: ${{ !cancelled() && needs.check-label.outputs.run-e2e == 'true' && needs.changes.outputs.has-files-requiring-all-checks == 'true' }} - needs: [changes, check-label, e2e, e2e-embed, e2e-embed-react, e2e-app-store] + needs: [changes, check-label, e2e, e2e-embed, e2e-embed-react, e2e-app-store, e2e-atoms] uses: ./.github/workflows/merge-reports.yml secrets: inherit @@ -249,6 +256,7 @@ jobs: e2e-embed, e2e-embed-react, e2e-app-store, + e2e-atoms, ] if: always() runs-on: buildjet-2vcpu-ubuntu-2204