Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
2b98b407
Unverified
Commit
2b98b407
authored
2 years ago
by
Nemanja Glumac
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[CI] Unify E2E tests workflows (#28431)
parent
4e4a69c3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/e2e-main.yml
+0
-222
0 additions, 222 deletions
.github/workflows/e2e-main.yml
.github/workflows/e2e-tests.yml
+20
-10
20 additions, 10 deletions
.github/workflows/e2e-tests.yml
with
20 additions
and
232 deletions
.github/workflows/e2e-main.yml
deleted
100644 → 0
+
0
−
222
View file @
4e4a69c3
name
:
E2E Tests
on
:
push
:
branches
:
-
"
master"
-
'
release-**'
paths-ignore
:
-
"
docs/**"
-
"
**.md"
-
"
.circleci/**"
-
"
**.unit.spec.*"
-
"
**_test.clj"
jobs
:
build
:
runs-on
:
ubuntu-20.04
timeout-minutes
:
25
strategy
:
matrix
:
edition
:
[
oss
,
ee
]
env
:
MB_EDITION
:
${{ matrix.edition }}
INTERACTIVE
:
false
steps
:
-
uses
:
actions/checkout@v3
-
name
:
Prepare front-end environment
uses
:
./.github/actions/prepare-frontend
-
name
:
Prepare back-end environment
uses
:
./.github/actions/prepare-backend
with
:
m2-cache-key
:
e2e-main
-
name
:
Build uberjar with ./bin/build
run
:
>-
./bin/build version translations frontend licenses drivers uberjar
-
name
:
Prepare uberjar artifact
uses
:
./.github/actions/prepare-uberjar-artifact
e2e-tests
:
runs-on
:
ubuntu-20.04
timeout-minutes
:
45
needs
:
build
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
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"
include
:
-
edition
:
oss
context
:
grep
java-version
:
11
services
:
maildev
:
image
:
maildev/maildev:2.0.5
ports
:
-
"
1080:1080"
-
"
1025:1025"
credentials
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
openldap
:
image
:
osixia/openldap:1.5.0
ports
:
-
"
389:389"
credentials
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
postgres-sample
:
image
:
metabase/qa-databases:postgres-sample-12
ports
:
-
"
5404:5432"
credentials
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
mongo-sample
:
image
:
metabase/qa-databases:mongo-sample-4.0
ports
:
-
27004:27017
credentials
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
mysql-sample
:
image
:
metabase/qa-databases:mysql-sample-8
ports
:
-
3304:3306
credentials
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
steps
:
-
uses
:
actions/checkout@v3
# Test runs will be recorded using Deploysentinel on `master` only
-
name
:
Set conditional ENVs
if
:
github.ref == 'refs/heads/master'
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 OSS-specific Cypress tests
if
:
matrix.edition == 'oss'
run
:
|
yarn run test-cypress-run \
--env grepTags=@OSS \
--spec './frontend/test/metabase/scenarios/**/*.cy.spec.js'
env
:
TERM
:
xterm
# These are EE-specific and version-agnostic tests
-
name
:
Run Cypress E2E tests against EE uberjar
if
:
matrix.edition == 'ee'
run
:
|
yarn run test-cypress-run \
--folder ${{ matrix.folder }}
env
:
TERM
:
xterm
-
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
visual-regression-tests
:
if
:
github.ref == 'refs/heads/master'
runs-on
:
ubuntu-20.04
timeout-minutes
:
45
needs
:
build
name
:
percy-screenshot-recording-${{ matrix.edition }}
env
:
MB_EDITION
:
${{ matrix.edition }}
MB_PREMIUM_EMBEDDING_TOKEN
:
${{ secrets.ENTERPRISE_TOKEN }}
strategy
:
matrix
:
java-version
:
[
11
]
edition
:
[
ee
]
services
:
maildev
:
image
:
maildev/maildev:2.0.5
ports
:
-
"
1080:1080"
-
"
1025:1025"
credentials
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
steps
:
-
uses
:
actions/checkout@v3
-
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
-
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
:
Percy Test
run
:
yarn run test-visual-run
env
:
PERCY_TOKEN
:
${{ secrets.PERCY_TOKEN }}
This diff is collapsed.
Click to expand it.
.github/workflows/e2e-tests.yml
+
20
−
10
View file @
2b98b407
name
:
E2E Tests
for PR
name
:
E2E Tests
on
:
push
:
branches
:
-
"
master"
-
'
release-**'
pull_request
:
types
:
[
opened
,
synchronize
,
reopened
,
ready_for_review
]
concurrency
:
group
:
${{ github.workflow }}-${{ github.
ref
}}
group
:
${{ github.workflow }}-${{ github.
head_ref && github.ref || github.run_id
}}
cancel-in-progress
:
true
jobs
:
...
...
@@ -44,7 +48,8 @@ jobs:
with
:
m2-cache-key
:
e2e-tests
-
run
:
./bin/build version translations frontend licenses drivers uberjar
-
name
:
Build uberjar with ./bin/build
run
:
./bin/build version translations frontend licenses drivers uberjar
-
name
:
Prepare uberjar artifact
uses
:
./.github/actions/prepare-uberjar-artifact
...
...
@@ -134,11 +139,10 @@ jobs:
password
:
${{ secrets.DOCKERHUB_TOKEN }}
steps
:
-
uses
:
actions/checkout@v3
-
name
:
Set conditional ENVs
-
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
:
|
if [[ ${{ github.event.pull_request.base.ref }} != release* ]]; then
echo "CYPRESS_DEPLOYSENTINEL_KEY=${{ secrets.CYPRESS_DEPLOYSENTINEL_KEY }}" >> $GITHUB_ENV
fi
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 }}
...
...
@@ -232,9 +236,9 @@ jobs:
visual-regression-tests
:
runs-on
:
ubuntu-20.04
timeout-minutes
:
30
timeout-minutes
:
45
needs
:
build
name
:
percy-
tests-sanity-check-${{ matrix.edition }}
name
:
percy-
visual-regression-tests
env
:
MB_EDITION
:
${{ matrix.edition }}
MB_PREMIUM_EMBEDDING_TOKEN
:
${{ secrets.ENTERPRISE_TOKEN }}
...
...
@@ -253,13 +257,17 @@ jobs:
password
:
${{ secrets.DOCKERHUB_TOKEN }}
steps
:
-
uses
:
actions/checkout@v3
-
name
:
Enable Percy recording on master only
if
:
github.ref == 'refs/heads/master'
run
:
|
echo "PERCY_TOKEN=${{ secrets.PERCY_TOKEN }}" >> $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
"
distribution
:
'
temurin
'
-
name
:
Prepare Cypress environment
uses
:
./.github/actions/prepare-cypress
...
...
@@ -273,3 +281,5 @@ jobs:
mv version.properties resources/
-
name
:
Percy Test
run
:
yarn run test-visual-run
env
:
PERCY_TOKEN
:
${{ env.PERCY_TOKEN }}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment