diff --git a/.github/workflows/e2e-stress-test-flake-fix.yml b/.github/workflows/e2e-stress-test-flake-fix.yml index 769e5d8ba01ff2deeb9b6d54ac574cf7bd8833bd..c97597b2d072cae2e25db99d7ebd8935f29e5b8f 100644 --- a/.github/workflows/e2e-stress-test-flake-fix.yml +++ b/.github/workflows/e2e-stress-test-flake-fix.yml @@ -20,6 +20,15 @@ on: type: string required: false default: "ee" + qa_db: + description: 'Select the type of Database you want to run your tests with' + type: choice + required: true + default: "none" + options: + - none + - sql + - mongo jobs: workflow-summary: @@ -35,6 +44,7 @@ jobs: echo '- `spec`: ${{ inputs.spec }}' >> $GITHUB_STEP_SUMMARY echo '- `burn_in`: ${{ inputs.burn_in }}' >> $GITHUB_STEP_SUMMARY echo '- `grep`: "${{ inputs.grep }}"' >> $GITHUB_STEP_SUMMARY + echo '- `qa_db`: "${{ inputs.qa_db }}"' >> $GITHUB_STEP_SUMMARY echo '' >> $GITHUB_STEP_SUMMARY echo 'triggered by: @${{ github.event.sender.login }}' >> $GITHUB_STEP_SUMMARY @@ -44,8 +54,8 @@ jobs: name: Stress test E2E flake fix env: DISPLAY: "" - QA_DB_ENABLED: true - CYPRESS_QA_DB_MONGO: true + QA_DB_ENABLED: ${{ contains(fromJSON('["sql", "mongo"]'), inputs.qa_db) }} + CYPRESS_QA_DB_MONGO: ${{ inputs.qa_db == 'mongo' }} CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }} CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }} MB_SNOWPLOW_AVAILABLE: true @@ -66,9 +76,9 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} maildev: true openldap: true - postgres: true - mysql: true - mongo: true + postgres: ${{ inputs.qa_db == 'sql' }} + mysql: ${{ inputs.qa_db == 'sql' }} + mongo: ${{ inputs.qa_db == 'mongo' }} - name: Download Metabase ${{ matrix.edition }} uberjar uses: ./.github/actions/e2e-download-uberjar diff --git a/e2e/support/config.js b/e2e/support/config.js index c70babc74665e0b18e11b195acd8aef79cc5c3ed..97f59cccedf736b429e0e1a68e76758a24039662 100644 --- a/e2e/support/config.js +++ b/e2e/support/config.js @@ -14,7 +14,7 @@ const isEnterprise = process.env["MB_EDITION"] === "ee"; const hasSnowplowMicro = process.env["MB_SNOWPLOW_AVAILABLE"]; const snowplowMicroUrl = process.env["MB_SNOWPLOW_URL"]; -const isQaDatabase = process.env["QA_DB_ENABLED"]; +const isQaDatabase = process.env["QA_DB_ENABLED"] === "true"; const sourceVersion = process.env["CROSS_VERSION_SOURCE"]; const targetVersion = process.env["CROSS_VERSION_TARGET"];