Skip to content

Scheduling infrastructure for absolutely everyone.

refactor: run atoms e2e when e2e label added (#23281)

Lauris Skraucis7ae0d6b7cc85
diff --git a/.github/workflows/all-checks.yml b/.github/workflows/all-checks.yml
index 8d033f754c6..34ab40d3f6e 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 87d64e15553..9e4e2af67e3 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 b7dc3afd9c8..e9f983df1a3 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