The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Wire embedding tests to ci-conductor (#77184)
Nemanja Glumac1bec6455d385
diff --git a/.github/workflows/embedding-sdk-component-tests.yml b/.github/workflows/embedding-sdk-component-tests.ymlindex 06868382138..8bc602e8400 100644--- a/.github/workflows/embedding-sdk-component-tests.yml+++ b/.github/workflows/embedding-sdk-component-tests.yml@@ -8,6 +8,12 @@ env:TERM: xtermTZ: US/Pacific # to make Node match the instance tzMB_EDITION: "ee"+ CI_CONDUCTOR_BASE_URL: ${{ secrets.CI_CONDUCTOR_BASE_URL }}+ CI_CONDUCTOR_WEBHOOK_SECRET: ${{ secrets.CI_CONDUCTOR_WEBHOOK_SECRET }}+ REPO_ID: ${{ github.event.repository.id }}+ COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}+ TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }}+ QUARANTINE_FAILURES_FILE: ${{ github.workspace }}/target/quarantine-failures.jsonljobs:sdk-component-tests:@@ -19,6 +25,7 @@ jobs:react-version: [18, 19]fail-fast: falseenv:+ CI_CONDUCTOR_TEST_SUITE: embedding-sdk-component-react-${{ matrix.react-version }}# Sensitive env vars (tokens, secrets) starting with `CYPRESS_` are accessed via async `cy.env()`# Example: `cy.env(["FOO"]).then(({ FOO }) => ...)`# For non-sensitive config, use `Cypress.expose()` in cypress config instead (synchronous)@@ -69,6 +76,8 @@ jobs:- name: Run Metabaserun: node e2e/runner/run_cypress_ci.js start+ - uses: ./.github/actions/resolve-job-id+- name: Make app db snapshotenv:CYPRESS_BROWSER: ${{ steps.cypress-prep.outputs.chrome-path }}@@ -112,6 +121,15 @@ jobs:trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}previous-step-outcome: ${{ steps.run-tests.outcome }}+ - name: Quarantine gate (dry run)+ if: always()+ continue-on-error: true+ timeout-minutes: 3+ uses: ./.github/actions/quarantine-gate+ with:+ adapter: e2e+ test-suite: ${{ env.CI_CONDUCTOR_TEST_SUITE }}+- name: "SDK component tests > Upload Cypress Artifacts upon failure"uses: actions/upload-artifact@v7if: failure()@@ -168,6 +186,7 @@ jobs:env:MB_RUN_MODE: "e2e"METASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}+ CI_CONDUCTOR_TEST_SUITE: embedding-sdk-component-backward-compatibility# Sensitive env vars (tokens, secrets) starting with `CYPRESS_` are accessed via async `cy.env()`# Example: `cy.env(["FOO"]).then(({ FOO }) => ...)`# For non-sensitive config, use `Cypress.expose()` in cypress config instead (synchronous)@@ -237,6 +256,8 @@ jobs:- name: Run Metabaserun: node e2e/runner/run_cypress_ci.js start+ - uses: ./.github/actions/resolve-job-id+- name: Make app db snapshotenv:CYPRESS_BROWSER: ${{ steps.cypress-prep.outputs.chrome-path }}@@ -278,6 +299,15 @@ jobs:trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}previous-step-outcome: ${{ steps.run-tests.outcome }}+ - name: Quarantine gate (dry run)+ if: always()+ continue-on-error: true+ timeout-minutes: 3+ uses: ./.github/actions/quarantine-gate+ with:+ adapter: e2e+ test-suite: ${{ env.CI_CONDUCTOR_TEST_SUITE }}+- name: Upload Cypress Artifacts upon failureuses: actions/upload-artifact@v7if: failure()diff --git a/.github/workflows/embedding-sdk-host-sample-apps-tests.yml b/.github/workflows/embedding-sdk-host-sample-apps-tests.ymlindex 70746f29a10..6a6c50f29d7 100644--- a/.github/workflows/embedding-sdk-host-sample-apps-tests.yml+++ b/.github/workflows/embedding-sdk-host-sample-apps-tests.yml@@ -10,6 +10,11 @@ env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}MB_EDITION: ee+ CI_CONDUCTOR_BASE_URL: ${{ secrets.CI_CONDUCTOR_BASE_URL }}+ CI_CONDUCTOR_WEBHOOK_SECRET: ${{ secrets.CI_CONDUCTOR_WEBHOOK_SECRET }}+ REPO_ID: ${{ github.event.repository.id }}+ COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}+ TARGET_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }}jobs:get-sample-apps-data:runs-on: ${{ vars.DEFAULT_RUNNER_KEY }}@@ -98,6 +103,7 @@ jobs:timeout-minutes: 45name: e2e-sample-app-${{ matrix.test_suite }}-tests-${{ matrix.environment }}-bundleenv:+ CI_CONDUCTOR_TEST_SUITE: embedding-sdk-sample-appMB_EDITION: eeMB_RUN_MODE: e2eMETASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}@@ -171,6 +177,8 @@ jobs:- name: Log free disk spacerun: df -h /+ - uses: ./.github/actions/resolve-job-id+- name: Run e2e tests for Sample Appid: run-e2e-testsif: ${{ steps.check-sample-app-branch.outputs.sample_app_branch_exists == 'true' }}@@ -207,6 +215,7 @@ jobs:timeout-minutes: 45name: e2e-sample-app-shoppy-e2e-tests-${{ matrix.environment }}-bundleenv:+ CI_CONDUCTOR_TEST_SUITE: embedding-sdk-shoppyMB_EDITION: eeMB_RUN_MODE: e2eMETASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}@@ -238,6 +247,8 @@ jobs:shoppy-datadog-application-id: ${{ secrets.SHOPPY_METABASE_APP_DATADOG_APPLICATION_ID }}shoppy-datadog-client-token: ${{ secrets.SHOPPY_METABASE_APP_DATADOG_CLIENT_TOKEN }}+ - uses: ./.github/actions/resolve-job-id+- name: Run e2e tests for Shoppyid: run-e2e-testsif: ${{ steps.shoppy-prep.outputs.sample_app_branch_exists == 'true' }}@@ -272,6 +283,7 @@ jobs:timeout-minutes: 45name: e2e-shoppy-synthetic-monitoring-testsenv:+ CI_CONDUCTOR_TEST_SUITE: embedding-sdk-shoppy-syntheticMB_EDITION: eeMB_RUN_MODE: e2eMETASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}@@ -316,6 +328,8 @@ jobs:env:GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ - uses: ./.github/actions/resolve-job-id+- name: Run synthetic monitoring testsid: run-e2e-testsif: ${{ steps.shoppy-prep.outputs.sample_app_branch_exists == 'true' }}@@ -363,6 +377,8 @@ jobs:timeout-minutes: 45name: e2e-host-app-${{ matrix.test_suite }}-tests-${{ matrix.environment }}-bundleenv:+ CI_CONDUCTOR_TEST_SUITE: embedding-sdk-host-app+ QUARANTINE_FAILURES_FILE: ${{ github.workspace }}/target/quarantine-failures.jsonlCYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}HOST_APP_ENVIRONMENT: ${{ matrix.environment }}permissions:@@ -399,6 +415,8 @@ jobs:- name: Run Metabaserun: node e2e/runner/run_cypress_ci.js start+ - uses: ./.github/actions/resolve-job-id+- name: Generate database snapshotsrun: |node e2e/runner/run_cypress_ci.js snapshot \@@ -423,6 +441,15 @@ jobs:./cypressif-no-files-found: ignore+ - name: Quarantine gate (dry run)+ if: always()+ continue-on-error: true+ timeout-minutes: 3+ uses: ./.github/actions/quarantine-gate+ with:+ adapter: e2e+ test-suite: ${{ env.CI_CONDUCTOR_TEST_SUITE }}+- name: Fail job if tests failedif: ${{ steps.run-e2e-tests.outcome != 'success' }}run: |diff --git a/e2e/support/ci_conductor.ts b/e2e/support/ci_conductor.tsindex 60c9dff8a31..ed38e2cb399 100644--- a/e2e/support/ci_conductor.ts+++ b/e2e/support/ci_conductor.ts@@ -34,6 +34,7 @@ const {CI_CONDUCTOR_BASE_URL,CI_CONDUCTOR_WEBHOOK_SECRET,CI_CONDUCTOR_DRY_RUN,+ CI_CONDUCTOR_TEST_SUITE,REPO_ID,GITHUB_RUN_ID,GITHUB_RUN_ATTEMPT,@@ -337,7 +338,7 @@ export async function reportFailedTestsToConductor(run_id: toNumber(GITHUB_RUN_ID),attempt: toNumber(GITHUB_RUN_ATTEMPT),job_id: getJobId(),- test_suite: "e2e",+ test_suite: CI_CONDUCTOR_TEST_SUITE || "e2e",// PR head sha / target branch when set by e2e-test.yml, else the ambient// (push/local) values. Empty strings collapse to null.sha: COMMIT_SHA || GITHUB_SHA || null,