Skip to content
Snippets Groups Projects
Unverified Commit c24e4841 authored by Mahatthana (Kelvin) Nomsawadi's avatar Mahatthana (Kelvin) Nomsawadi Committed by GitHub
Browse files

Allow stress testing E2E tests with PostgresDB (#46065)

* Modify the E2E stress test workflow to allow running PostgresDB

* Fix syntax

* Add qa_db to workflow summary

* Only run necessary containers

* Fix QA DB snapshots running when QA_DB_ENABLED=false

* Use more generic option that's not only specific to postgres
parent 3ec2ca99
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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"];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment