Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

E2E workflows env vars cleanup (#66592)

Nemanja Glumacb5f483d951d4
diff --git a/.github/workflows/e2e-stress-test-flake-fix.yml b/.github/workflows/e2e-stress-test-flake-fix.yml
index 94f2f37ab09..520481802a6 100644
--- a/.github/workflows/e2e-stress-test-flake-fix.yml
+++ b/.github/workflows/e2e-stress-test-flake-fix.yml
@@ -76,19 +76,15 @@ jobs:
timeout-minutes: 60
name: Stress test E2E flake fix
env:
- DISPLAY: ""
- MB_RUN_MODE: e2e
- METASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}
+ DISPLAY: "" # https://github.com/cypress-io/cypress/issues/4034
+ TERM: xterm
+ TZ: US/Pacific # to make Node match the instance tz
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.STAGING_MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.STAGING_MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.STAGING_MB_PRO_SELF_HOSTED_TOKEN }}
- MB_SNOWPLOW_AVAILABLE: true
- MB_SNOWPLOW_URL: "http://localhost:9090" # Snowplow micro
MB_EDITION: ${{ inputs.mb_edition }}
CYPRESS_ENABLE_NETWORK_THROTTLING: ${{ inputs.enable_network_throttling }}
- TERM: xterm
- TZ: US/Pacific # to make node match the instance tz
steps:
- uses: actions/checkout@v4
with:
@@ -114,7 +110,6 @@ jobs:
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
-
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml
index f023ae4bd97..677b46607ce 100644
--- a/.github/workflows/e2e-test.yml
+++ b/.github/workflows/e2e-test.yml
@@ -29,6 +29,15 @@ on:
required: false
type: number
+env:
+ DISPLAY: "" # https://github.com/cypress-io/cypress/issues/4034
+ TERM: xterm
+ TZ: US/Pacific # to make Node match the instance tz
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
+ PR_NUMBER: ${{ github.event.pull_request.number || '' }}
+ JOB_NAME: ${{ inputs.name }}
+
jobs:
e2e-tests:
runs-on: ${{ inputs.runner }}
@@ -36,21 +45,12 @@ jobs:
name: e2e-tests-${{ inputs.name }}-${{ inputs.edition }}
env:
MB_EDITION: ${{ inputs.edition }}
- DISPLAY: ""
- PR_NUMBER: ${{ github.event.pull_request.number || '' }}
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
- JOB_NAME: ${{ inputs.name }}
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.STAGING_MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.STAGING_MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.STAGING_MB_PRO_SELF_HOSTED_TOKEN }}
- CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
- COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
- TZ: US/Pacific # to make node match the instance tz
- CYPRESS_CI: true
steps:
- uses: actions/checkout@v4
with:
diff --git a/.github/workflows/embedding-sdk-component-tests.yml b/.github/workflows/embedding-sdk-component-tests.yml
index 44b117b7288..3d755dd72e7 100644
--- a/.github/workflows/embedding-sdk-component-tests.yml
+++ b/.github/workflows/embedding-sdk-component-tests.yml
@@ -3,6 +3,12 @@ name: Embedding SDK Component Tests
on:
workflow_call:
+env:
+ DISPLAY: "" # https://github.com/cypress-io/cypress/issues/4034
+ TERM: xterm
+ TZ: US/Pacific # to make Node match the instance tz
+ MB_EDITION: "ee"
+
jobs:
sdk-component-tests:
name: "SDK component tests (React ${{ matrix.react-version }})"
@@ -13,17 +19,12 @@ jobs:
react-version: [18, 19]
fail-fast: false
env:
- MB_EDITION: ee
- DISPLAY: ""
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.STAGING_MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.STAGING_MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.STAGING_MB_PRO_SELF_HOSTED_TOKEN }}
- COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
- TZ: US/Pacific # to make node match the instance tz
- CYPRESS_CI: true
steps:
- uses: actions/checkout@v4
@@ -149,8 +150,6 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 45
env:
- MB_EDITION: ee
- DISPLAY: ""
MB_RUN_MODE: "e2e"
METASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
@@ -159,9 +158,6 @@ jobs:
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.STAGING_MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.STAGING_MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.STAGING_MB_PRO_SELF_HOSTED_TOKEN }}
- COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
- TZ: US/Pacific # to make node match the instance tz
- CYPRESS_CI: true
steps:
- name: Check out the code from the previous commit
diff --git a/.github/workflows/embedding-sdk-host-sample-apps-tests.yml b/.github/workflows/embedding-sdk-host-sample-apps-tests.yml
index 9d5a3f03786..235c5b98352 100644
--- a/.github/workflows/embedding-sdk-host-sample-apps-tests.yml
+++ b/.github/workflows/embedding-sdk-host-sample-apps-tests.yml
@@ -3,6 +3,14 @@ name: "[NOT REQUIRED] SDK Compatibility tests"
on:
workflow_call:
+env:
+ DISPLAY: "" # https://github.com/cypress-io/cypress/issues/4034
+ TERM: xterm
+ TZ: US/Pacific # to make Node match the instance tz
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
+ PR_NUMBER: ${{ github.event.pull_request.number || '' }}
+ MB_EDITION: ee
jobs:
get-sample-apps-data:
runs-on: ubuntu-22.04
@@ -100,15 +108,9 @@ jobs:
name: e2e-sample-app-${{ matrix.test_suite }}-tests-${{ matrix.environment }}-bundle
env:
MB_EDITION: ee
- DISPLAY: ""
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- PR_NUMBER: ${{ github.event.pull_request.number || '' }}
- HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
MB_RUN_MODE: e2e
METASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
- TZ: US/Pacific # to make node match the instance tz
- CYPRESS_CI: true
SAMPLE_APP_BRANCH_NAME: ${{ needs.get-sample-apps-data.outputs.branch_name }}
SAMPLE_APP_ENVIRONMENT: ${{ matrix.environment }}
permissions:
@@ -237,14 +239,7 @@ jobs:
timeout-minutes: 45
name: e2e-host-app-${{ matrix.test_suite }}-tests-${{ matrix.environment }}-bundle
env:
- MB_EDITION: ee
- DISPLAY: ""
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- PR_NUMBER: ${{ github.event.pull_request.number || '' }}
- HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
- TZ: US/Pacific # to make node match the instance tz
- CYPRESS_CI: true
HOST_APP_ENVIRONMENT: ${{ matrix.environment }}
permissions:
id-token: write
diff --git a/e2e/support/config.js b/e2e/support/config.js
index c5f655ced34..649fc856459 100644
--- a/e2e/support/config.js
+++ b/e2e/support/config.js
@@ -25,7 +25,7 @@ const {
const cypressSplit = require("cypress-split");
const isEnterprise = process.env["MB_EDITION"] === "ee";
-const isCI = process.env["CYPRESS_CI"] === "true";
+const isCI = !!process.env.CI;
const snowplowMicroUrl = process.env["MB_SNOWPLOW_URL"];