Skip to content
Snippets Groups Projects
Unverified Commit 296f5ffc authored by Nemanja Glumac's avatar Nemanja Glumac Committed by GitHub
Browse files

Improve E2E matrix generation and simplify job conditionals (#34444)

parent 8f87659c
No related branches found
No related tags found
No related merge requests found
......@@ -18,57 +18,46 @@ runs:
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 defaultOptions = {
"java-version": java,
runner: defaultRunner,
edition: "ee",
context: "folder"
};
const testSets = [
["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", {} ],
["oss-subset", { edition: 'oss', context: "special" } ],
["slow", { runner: beefierRunner, context: "special" } ],
];
const specialContext = ["oss-subset", "slow"];
const defaultConfig = folderContext.map(folder => {
return {
"java-version": java,
folder,
runner: defaultRunner,
edition: "ee",
};
});
const extraConfig = specialContext.map(s => {
const config = testSets.map(([name, specialOptions]) => {
return {
"java-version": java,
context: s,
runner: getRunner(s),
edition: getEdition(s),
};
...defaultOptions,
...specialOptions,
name,
}
});
function getRunner(context) {
return context === "slow" ? beefierRunner : defaultRunner;
}
function getEdition(context) {
return context === "oss-subset" ? "oss" : "ee";
}
const matrix = { include: [...defaultConfig, ...extraConfig] };
const matrix = { include: config };
return matrix;
......@@ -156,7 +156,7 @@ jobs:
(needs.download_uberjar.result == 'success' || needs.build.result == 'success')
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
name: e2e-tests-${{ matrix.folder }}${{ matrix.context }}-${{ matrix.edition }}
name: e2e-tests-${{ matrix.name }}-${{ matrix.edition }}
env:
MB_EDITION: ${{ matrix.edition }}
DISPLAY: ""
......@@ -286,7 +286,7 @@ jobs:
TERM: xterm
- name: Run slow and resource-intensive Cypress tests
if: matrix.context == 'slow' && github.event_name != 'schedule'
if: matrix.name == 'slow' && github.event_name != 'schedule'
run: |
yarn run test-cypress-run \
--env grepTags="@slow",grepOmitFiltered=true \
......@@ -295,12 +295,12 @@ jobs:
env:
TERM: xterm
- name: Run EE Cypress tests on ${{ matrix.folder }}
if: matrix.edition == 'ee' && github.event_name != 'schedule' && matrix.context != 'slow'
- name: Run EE Cypress tests on ${{ matrix.name }}
if: matrix.context == 'folder' && github.event_name != 'schedule'
run: |
yarn run test-cypress-run \
--env grepTags="-@slow --@quarantine",grepOmitFiltered=true \
--folder ${{ matrix.folder }} \
--folder ${{ matrix.name }} \
--browser ${{ steps.setup-chrome.outputs.chrome-path }}
env:
TERM: xterm
......@@ -323,12 +323,12 @@ jobs:
RECORD_REPLAY_METADATA_FILE: /tmp/replay-metadata.json
RECORD_REPLAY_METADATA_TEST_RUN_ID: ${{ needs.test-run-id.outputs.testRunId }}
- name: Run EE Cypress tests on ${{ matrix.folder }} using Replay.io browser
if: matrix.edition == 'ee' && github.event_name == 'schedule' && matrix.context != 'slow'
- name: Run EE Cypress tests on ${{ matrix.name }} using Replay.io browser
if: matrix.context == 'folder' && github.event_name == 'schedule'
run: |
yarn run test-cypress-run \
--env grepTags="-@slow --@quarantine,grepOmitFiltered=true \
--folder ${{ matrix.folder }} \
--folder ${{ matrix.name }} \
--browser "replay-chromium"
env:
TERM: xterm
......@@ -347,7 +347,7 @@ jobs:
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-recording-${{ matrix.folder }}${{ matrix.context }}-${{ matrix.edition }}
name: cypress-recording-${{ matrix.name }}-${{ matrix.edition }}
path: |
./cypress
./logs/test.log
......@@ -362,7 +362,7 @@ jobs:
needs.download_uberjar.result == 'skipped'
runs-on: ${{ matrix.runner }}
timeout-minutes: 5
name: e2e-tests-${{ matrix.folder }}${{ matrix.context }}-${{ matrix.edition }}
name: e2e-tests-${{ matrix.name }}-${{ matrix.edition }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.e2e-matrix-builder.outputs.matrix) }}
......
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