fix(deps): vuln major upgrades — 4 packages (major: 1 · minor: 2 · patch: 1) #8
Workflow file for this run
This file contains hidden or 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
| name: E2E Tests | ||
| on: | ||
| push: | ||
| branches: | ||
| - "master" | ||
| - "release-**" | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| files-changed: | ||
| name: Check which files changed | ||
| runs-on: ubuntu-22.04 | ||
| timeout-minutes: 3 | ||
| outputs: | ||
| e2e_all: ${{ steps.changes.outputs.e2e_all }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Test which files changed | ||
| uses: dorny/paths-filter@v3.0.0 | ||
| id: changes | ||
| with: | ||
| token: ${{ github.token }} | ||
| filters: .github/file-paths.yaml | ||
| e2e-matrix-builder: | ||
| uses: ./.github/workflows/e2e-matrix-builder.yml | ||
| with: | ||
| chunks: 50 | ||
| # if this is a test on a release branch, we need to check the build requirements | ||
| get-build-requirements: | ||
| if: | | ||
| !cancelled() && | ||
| contains(github.ref, 'release-x') | ||
| runs-on: ubuntu-22.04 | ||
| timeout-minutes: 10 | ||
| outputs: | ||
| java_version: ${{ fromJson(steps.dependencies.outputs.result).java_version }} | ||
| node_version: ${{ fromJson(steps.dependencies.outputs.result).node_version }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| sparse-checkout: release | ||
| - name: Prepare build scripts | ||
| run: cd ${{ github.workspace }}/release && yarn && yarn build | ||
| - name: Get build dependencies | ||
| uses: actions/github-script@v7 | ||
| id: dependencies | ||
| with: | ||
| script: | # js | ||
| const { getBuildRequirements, getVersionFromReleaseBranch } = require('${{ github.workspace }}/release/dist/index.cjs'); | ||
| const version = getVersionFromReleaseBranch('${{ github.ref }}'); | ||
| const requirements = getBuildRequirements(version); | ||
| return { | ||
| java_version: requirements.java, | ||
| node_version: requirements.node, | ||
| }; | ||
| build: | ||
| needs: [files-changed, get-build-requirements] | ||
| if: | | ||
| !cancelled() && | ||
| github.event.pull_request.draft == false && | ||
| needs.files-changed.outputs.e2e_all == 'true' | ||
| runs-on: ubuntu-22.04 | ||
| timeout-minutes: 25 | ||
| strategy: | ||
| matrix: | ||
| edition: [oss, ee] | ||
| env: | ||
| MB_EDITION: ${{ matrix.edition }} | ||
| INTERACTIVE: false | ||
| # make sure that builds on release branches get licenses, because we use them for releases | ||
| SKIP_LICENSES: ${{ github.event_name == 'pull_request' }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Prepare front-end environment | ||
| uses: ./.github/actions/prepare-frontend | ||
| with: | ||
| node-version: "${{ needs.get-build-requirements.outputs.node_version }}" | ||
| - name: Prepare back-end environment | ||
| uses: ./.github/actions/prepare-backend | ||
| with: | ||
| m2-cache-key: uberjar | ||
| java-version: "${{ needs.get-build-requirements.outputs.java_version || 11 }}" | ||
| - name: Build uberjar with ./bin/build.sh | ||
| run: ./bin/build.sh | ||
| - name: Prepare uberjar artifact | ||
| uses: ./.github/actions/prepare-uberjar-artifact | ||
| with: | ||
| name: metabase-${{ matrix.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar | ||
| e2e-tests: | ||
| name: ${{ matrix.name }}-${{ matrix.edition }} | ||
| uses: ./.github/workflows/e2e-test.yml | ||
| needs: [build, e2e-matrix-builder] | ||
| if: | | ||
| !cancelled() && needs.build.result == 'success' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: ${{ fromJson(needs.e2e-matrix-builder.outputs.matrix) }} | ||
| secrets: inherit | ||
| with: | ||
| name: ${{ matrix.name }} | ||
| edition: ${{ matrix.edition }} | ||
| specs: ${{ matrix.specs }} | ||
| tags: ${{ matrix.tags }} | ||
| runner: ${{ matrix.runner }} | ||
| # run this separately to make it non-blocking | ||
| flaky-e2e-tests: | ||
| name: Flaky e2e Tests | ||
| uses: ./.github/workflows/e2e-test.yml | ||
| needs: build | ||
| if: | | ||
| !cancelled() && needs.build.result == 'success' | ||
| secrets: inherit | ||
| with: | ||
| name: Flaky | ||
| tags: "@flaky" | ||
| e2e-tests-result: | ||
| needs: [e2e-tests, flaky-e2e-tests] | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| name: e2e-tests-result | ||
| if: always() && !cancelled() | ||
| env: | ||
| E2E_TESTS_RESULT: ${{ needs.e2e-tests.result }} | ||
| FLAKY_E2E_TESTS_RESULT: ${{ needs.flaky-e2e-tests.result }} | ||
| steps: | ||
| - name: Stub | ||
| if: ${{ needs.e2e-tests.result == 'skipped' }} | ||
| run: | | ||
| echo "Didn't run due to conditional filtering" | ||
| - name: Test results | ||
| if: ${{ needs.e2e-tests.result != 'skipped' }} | ||
| run: | # sh | ||
| echo "E2E Tests: ${{ needs.e2e-tests.result }}" | ||
| echo "Flaky E2E Tests: ${{ needs.flaky-e2e-tests.result }}" | ||
| if [ "${{ needs.e2e-tests.result }}" != "success" ]; then | ||
| echo "E2E Tests failed" | ||
| exit 1 | ||
| fi | ||
| pr-env: | ||
|
Check failure on line 158 in .github/workflows/e2e-tests.yml
|
||
| needs: [build] | ||
| if: | | ||
| !cancelled() && | ||
| contains(github.event.pull_request.labels.*.name, 'PR-Env') | ||
| uses: ./.github/workflows/pr-env.yml | ||
| secrets: inherit | ||