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
ea17aa78
Unverified
Commit
ea17aa78
authored
1 year ago
by
Nemanja Glumac
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Parameterize E2E matrix (#34431)
parent
009000e5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/actions/build-e2e-matrix/action.yml
+74
-0
74 additions, 0 deletions
.github/actions/build-e2e-matrix/action.yml
.github/workflows/e2e-tests.yml
+19
-75
19 additions, 75 deletions
.github/workflows/e2e-tests.yml
with
93 additions
and
75 deletions
.github/actions/build-e2e-matrix/action.yml
0 → 100644
+
74
−
0
View file @
ea17aa78
name
:
Build E2E Matrix
description
:
Build and output a custom matrix for E2E tests.
outputs
:
matrix
:
description
:
Parameterized matrix in JSON format
value
:
${{ steps.matrix.outputs.result }}
runs
:
using
:
"
composite"
steps
:
-
uses
:
actions/github-script@v6
id
:
matrix
with
:
script
:
|
const java = 11;
const defaultRunner = "ubuntu-22.04";
const beefierRunner = "buildjet-2vcpu-ubuntu-2204";
const folderContext = [
"actions",
"admin",
"admin-2",
"binning",
"collections",
"custom-column",
"dashboard",
"dashboard-cards",
"dashboard-filters",
"embedding",
"filters",
"joins",
"models",
"native",
"native-filters",
"onboarding",
"organization",
"permissions",
"question",
"sharing",
"visualizations",
];
const specialContext = ["oss-subset", "slow"];
const defaultConfig = folderContext.map(folder => {
return {
"java-version": java,
folder,
runner: defaultRunner,
edition: "ee",
};
});
const extraConfig = specialContext.map(s => {
return {
"java-version": java,
context: s,
runner: getRunner(s),
edition: getEdition(s),
};
});
function getRunner(context) {
return context === "slow" ? beefierRunner : defaultRunner;
}
function getEdition(context) {
return context === "oss-subset" ? "oss" : "ee";
}
const matrix = { include: [...defaultConfig, ...extraConfig] };
return matrix;
This diff is collapsed.
Click to expand it.
.github/workflows/e2e-tests.yml
+
19
−
75
View file @
ea17aa78
...
...
@@ -39,13 +39,25 @@ jobs:
token
:
${{ github.token }}
filters
:
.github/file-paths.yaml
e2e-matrix-builder
:
runs-on
:
ubuntu-22.04
timeout-minutes
:
5
outputs
:
matrix
:
${{ steps.e2e-matrix.outputs.matrix }}
steps
:
-
uses
:
actions/checkout@v3
-
name
:
Generate matrix for E2E tests
id
:
e2e-matrix
uses
:
./.github/actions/build-e2e-matrix
download_uberjar
:
runs-on
:
ubuntu-22.04
timeout-minutes
:
10
needs
:
files-changed
needs
:
[
files-changed
,
e2e-matrix-builder
]
if
:
|
!cancelled() &&
github.event.pull_request.draft == false &&
needs.e2e-matrix-builder.result == 'success' &&
needs.files-changed.outputs.e2e_specs == 'true' &&
needs.files-changed.outputs.e2e_all != 'true'
strategy
:
...
...
@@ -107,10 +119,11 @@ jobs:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
build
:
needs
:
[
download_uberjar
,
files-changed
]
needs
:
[
download_uberjar
,
files-changed
,
e2e-matrix-builder
]
if
:
|
!cancelled() &&
github.event.pull_request.draft == false &&
needs.e2e-matrix-builder.result == 'success' &&
needs.download_uberjar.result == 'skipped' &&
needs.files-changed.outputs.e2e_all == 'true'
runs-on
:
ubuntu-22.04
...
...
@@ -137,7 +150,7 @@ jobs:
uses
:
./.github/actions/prepare-uberjar-artifact
e2e-tests
:
needs
:
[
build
,
files-changed
,
test-run-id
,
download_uberjar
]
needs
:
[
build
,
files-changed
,
test-run-id
,
download_uberjar
,
e2e-matrix-builder
]
if
:
|
!cancelled() &&
(needs.download_uberjar.result == 'success' || needs.build.result == 'success')
...
...
@@ -158,41 +171,7 @@ jobs:
TZ
:
US/Pacific
# to make node match the instance tz
strategy
:
fail-fast
:
false
matrix
:
runner
:
[
ubuntu-22.04
]
java-version
:
[
11
]
edition
:
[
ee
]
folder
:
-
"
actions"
-
"
admin"
-
"
admin-2"
-
"
binning"
-
"
collections"
-
"
custom-column"
-
"
dashboard"
-
"
dashboard-cards"
-
"
dashboard-filters"
-
"
embedding"
-
"
filters"
-
"
joins"
-
"
models"
-
"
native"
-
"
native-filters"
-
"
onboarding"
-
"
organization"
-
"
permissions"
-
"
question"
-
"
sharing"
-
"
visualizations"
include
:
-
edition
:
oss
runner
:
ubuntu-22.04
context
:
oss-subset
java-version
:
11
-
edition
:
ee
java-version
:
11
context
:
slow
runner
:
buildjet-2vcpu-ubuntu-2204
matrix
:
${{ fromJSON(needs.e2e-matrix-builder.outputs.matrix) }}
services
:
maildev
:
image
:
maildev/maildev:2.0.5
...
...
@@ -375,7 +354,7 @@ jobs:
if-no-files-found
:
ignore
e2e-tests-skipped-stub
:
needs
:
[
build
,
files-changed
,
download_uberjar
]
needs
:
[
build
,
files-changed
,
download_uberjar
,
e2e-matrix-builder
]
if
:
|
!cancelled() &&
needs.files-changed.outputs.e2e_all == 'false' &&
...
...
@@ -386,42 +365,7 @@ jobs:
name
:
e2e-tests-${{ matrix.folder }}${{ matrix.context }}-${{ matrix.edition }}
strategy
:
fail-fast
:
false
matrix
:
runner
:
[
ubuntu-22.04
]
java-version
:
[
11
]
edition
:
[
ee
]
folder
:
-
"
actions"
-
"
admin"
-
"
admin-2"
-
"
binning"
-
"
collections"
-
"
custom-column"
-
"
dashboard"
-
"
dashboard-cards"
-
"
dashboard-filters"
-
"
embedding"
-
"
filters"
-
"
joins"
-
"
models"
-
"
native"
-
"
native-filters"
-
"
onboarding"
-
"
organization"
-
"
permissions"
-
"
question"
-
"
sharing"
-
"
visualizations"
include
:
-
edition
:
oss
runner
:
ubuntu-22.04
java-version
:
11
context
:
oss-subset
-
edition
:
ee
runner
:
ubuntu-latest
java-version
:
11
context
:
slow
matrix
:
${{ fromJSON(needs.e2e-matrix-builder.outputs.matrix) }}
steps
:
-
run
:
|
echo "Didn't run due to conditional filtering"
...
...
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