forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,6 @@ on: | |
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.run_id }} | ||
|
||
jobs: | ||
test-run-id: | ||
runs-on: ubuntu-22.04 | ||
|
@@ -41,158 +38,16 @@ jobs: | |
with: | ||
m2-cache-key: e2e-tests | ||
|
||
- name: Cache uberjar | ||
id: cache-uberjar | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./target/uberjar/metabase.jar | ||
key: ${{ github.workflow }}-uberjar | ||
|
||
- name: Build uberjar with ./bin/build.sh | ||
if: steps.cache-uberjar.outputs.cache-hit != 'true' | ||
run: ./bin/build.sh | ||
|
||
- name: Prepare uberjar artifact | ||
uses: ./.github/actions/prepare-uberjar-artifact | ||
|
||
e2e-tests: | ||
needs: [build, test-run-id] | ||
if: | | ||
always() && | ||
needs.build.result == 'success' | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 60 | ||
name: e2e-tests-${{ matrix.folder }}${{ matrix.context }}-${{ matrix.edition }} | ||
env: | ||
MB_EDITION: ${{ matrix.edition }} | ||
DISPLAY: "" | ||
QA_DB_ENABLED: true | ||
MB_PREMIUM_EMBEDDING_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }} | ||
MB_SNOWPLOW_AVAILABLE: true | ||
MB_SNOWPLOW_URL: "http://localhost:9090" # Snowplow micro | ||
ELECTRON_EXTRA_LAUNCH_ARGS: "--remote-debugging-port=40500" # deploysentinel | ||
TZ: US/Pacific # to make node match the instance tz | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java-version: [11] | ||
edition: [ee] | ||
folder: | ||
- "admin" | ||
- "binning" | ||
- "collections" | ||
- "custom-column" | ||
- "dashboard" | ||
- "dashboard-filters" | ||
- "downloads" | ||
- "embedding" | ||
- "filters" | ||
- "joins" | ||
- "models" | ||
- "native" | ||
- "native-filters" | ||
- "onboarding" | ||
- "organization" | ||
- "permissions" | ||
- "question" | ||
- "sharing" | ||
- "visualizations" | ||
services: | ||
maildev: | ||
image: maildev/maildev:2.0.5 | ||
ports: | ||
- "1080:1080" | ||
- "1025:1025" | ||
credentials: | ||
username: jasonlaster11 | ||
password: dckr_pat_kCPs_U_Z7Z6zOn9CguLFcckDH4Q | ||
openldap: | ||
image: osixia/openldap:1.5.0 | ||
ports: | ||
- "389:389" | ||
credentials: | ||
username: jasonlaster11 | ||
password: dckr_pat_kCPs_U_Z7Z6zOn9CguLFcckDH4Q | ||
postgres-sample: | ||
image: metabase/qa-databases:postgres-sample-12 | ||
ports: | ||
- "5404:5432" | ||
credentials: | ||
username: jasonlaster11 | ||
password: dckr_pat_kCPs_U_Z7Z6zOn9CguLFcckDH4Q | ||
mongo-sample: | ||
image: metabase/qa-databases:mongo-sample-4.4 | ||
ports: | ||
- 27004:27017 | ||
credentials: | ||
username: jasonlaster11 | ||
password: dckr_pat_kCPs_U_Z7Z6zOn9CguLFcckDH4Q | ||
mysql-sample: | ||
image: metabase/qa-databases:mysql-sample-8 | ||
ports: | ||
- 3304:3306 | ||
credentials: | ||
username: jasonlaster11 | ||
password: dckr_pat_kCPs_U_Z7Z6zOn9CguLFcckDH4Q | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Record runs using Deploysentinel except for the release branch | ||
if: ${{ github.ref == 'refs/heads/master' || !(startsWith(github.event.pull_request.base.ref, 'release')) }} | ||
run: | | ||
echo "CYPRESS_DEPLOYSENTINEL_KEY=${{ secrets.CYPRESS_DEPLOYSENTINEL_KEY }}" >> $GITHUB_ENV | ||
- name: Prepare front-end environment | ||
uses: ./.github/actions/prepare-frontend | ||
- name: Prepare JDK ${{ matrix.java-version }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
distribution: "temurin" | ||
- name: Prepare Cypress environment | ||
uses: ./.github/actions/prepare-cypress | ||
- name: Run Snowplow micro | ||
uses: ./.github/actions/run-snowplow-micro | ||
|
||
- uses: actions/download-artifact@v3 | ||
name: Retrieve uberjar artifact for ${{ matrix.edition }} | ||
with: | ||
name: metabase-${{ matrix.edition }}-uberjar | ||
- name: Get the version info | ||
run: | | ||
jar xf target/uberjar/metabase.jar version.properties | ||
mv version.properties resources/ | ||
- name: Run EE Cypress tests on ${{ matrix.folder }} | ||
if: matrix.edition == 'ee' && github.event_name != 'schedule' | ||
run: | | ||
yarn run test-cypress-run \ | ||
--env grepTags="-@OSS" \ | ||
--folder ${{ matrix.folder }} | ||
env: | ||
TERM: xterm | ||
|
||
# REPLAY.IO specific jobs | ||
- name: Install Replay.io browser | ||
if: ${{ github.event_name == 'schedule' }} | ||
run: npx @replayio/cypress install | ||
|
||
- name: Run EE Cypress tests on ${{ matrix.folder }} using Replay.io browser | ||
if: matrix.edition == 'ee' && github.event_name == 'schedule' | ||
run: | | ||
yarn run test-cypress-run \ | ||
--env grepTags="-@OSS" \ | ||
--folder ${{ matrix.folder }} \ | ||
--browser "replay-chromium" | ||
env: | ||
TERM: xterm | ||
RECORD_REPLAY_METADATA_FILE: /tmp/replay-metadata.json | ||
RECORD_REPLAY_METADATA_TEST_RUN_ID: ${{ needs.test-run-id.outputs.testRunId }} | ||
|
||
- name: Upload Replay.io recordings | ||
if: github.event_name == 'schedule' && always() | ||
uses: replayio/[email protected] | ||
with: | ||
api-key: rwk_gXbvYctIcR6RZyEzUvby3gtkO4esrB2L321lkY8FSuQ | ||
public: true | ||
|
||
- name: Upload Cypress Artifacts upon failure | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: cypress-recording-${{ matrix.folder }}${{ matrix.context }}-${{ matrix.edition }} | ||
path: | | ||
./cypress | ||
./logs/test.log | ||
if-no-files-found: ignore |