diff --git a/.github/workflows/backend-skipped-checks.yml b/.github/workflows/backend-skipped-checks.yml deleted file mode 100644 index e1506b2d087bc56c070f49f07bd4e0beb837ddb3..0000000000000000000000000000000000000000 --- a/.github/workflows/backend-skipped-checks.yml +++ /dev/null @@ -1,59 +0,0 @@ -# Required checks with path filtering rules will block pull requests from merging if they change only the excluded files. -# This is a workaround to allow the PR to be merged. -# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks -name: Backend - -on: - push: - branches: - - 'master' - - 'release-**' - paths: - - "docs/**" - - "**.md" - # frontend and E2E tests - - "**/frontend/test/**" - - "**/frontend/**.unit.*" - pull_request: - paths: - - "docs/**" - - "**.md" - # frontend and E2E tests - - "**/frontend/test/**" - - "**/frontend/**.unit.*" - -jobs: - - be-linter-clj-kondo: - runs-on: ubuntu-20.04 - timeout-minutes: 10 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-linter-eastwood: - runs-on: ubuntu-20.04 - timeout-minutes: 20 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-linter-namespace-decls: - runs-on: ubuntu-20.04 - timeout-minutes: 10 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests: - runs-on: ubuntu-20.04 - name: be-tests-java-${{ matrix.java-version }}-${{ matrix.edition }} - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - edition: [oss, ee] - java-version: [11, 17] - steps: - - run: | - echo "Didn't run due to conditional filtering" diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index eb35240f7066d0f45f1c3849f90a2d615ad586c4..d84c6a039e976cb6a0cafdd925c04f9765df79b6 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -5,25 +5,28 @@ on: branches: - 'master' - 'release-**' - paths-ignore: - - "docs/**" - - "**.md" - # frontend and E2E tests - - "**/frontend/test/**" - - "**/frontend/**.unit.*" pull_request: types: [opened, synchronize, reopened, ready_for_review] - paths-ignore: - - "docs/**" - - "**.md" - # frontend and E2E tests - - "**/frontend/test/**" - - "**/frontend/**.unit.*" jobs: + files-changed: + name: Check which files changed + runs-on: ubuntu-20.04 + timeout-minutes: 3 + outputs: + backend_all: ${{ steps.changes.outputs.backend_all }} + steps: + - uses: actions/checkout@v3 + - name: Test which files changed + uses: dorny/paths-filter@v2.11.1 + id: changes + with: + token: ${{ github.token }} + filters: .github/file-paths.yaml be-linter-cloverage: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 steps: @@ -43,6 +46,8 @@ jobs: flags: back-end be-linter-clj-kondo: + needs: files-changed + if: needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 10 steps: @@ -94,7 +99,8 @@ jobs: /work/modules/drivers/presto-jdbc/test be-linter-eastwood: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 20 steps: @@ -110,7 +116,8 @@ jobs: # we have to extract that job manually here. Backend developers have requested that this # test runs at all times to give them an early warning sign is something is broken. be-tests-java-11-ee-pre-check: - if: github.event.pull_request.draft == true + needs: files-changed + if: github.event.pull_request.draft == true && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 name: be-tests-java-11-ee-pre-check timeout-minutes: 25 @@ -139,7 +146,8 @@ jobs: reporter: java-junit be-tests: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 name: be-tests-java-${{ matrix.java-version }}-${{ matrix.edition }} timeout-minutes: 25 @@ -172,10 +180,29 @@ jobs: name: JUnit Test Report be-tests-java-${{ matrix.java-version }}-${{ matrix.edition }} reporter: java-junit + be-tests-stub: + needs: files-changed + if: | + always() && + github.event.pull_request.draft == false && + needs.files-changed.outputs.backend_all == 'false' + runs-on: ubuntu-20.04 + name: be-tests-java-${{ matrix.java-version }}-${{ matrix.edition }} + timeout-minutes: 5 + strategy: + fail-fast: false + matrix: + edition: [oss, ee] + java-version: [11, 17] + steps: + - run: | + echo "Didn't run due to conditional filtering" + # checks that all the namespaces we actually ship can be compiled, without any dependencies that we don't ship (such # as `:dev` dependencies). See #27009 for more context. be-check: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 name: be-check-java-${{ matrix.java-version }} timeout-minutes: 10 diff --git a/.github/workflows/drivers-skipped-checks.yml b/.github/workflows/drivers-skipped-checks.yml deleted file mode 100644 index f53268e77b7b44188732bbd13b477940fc12c589..0000000000000000000000000000000000000000 --- a/.github/workflows/drivers-skipped-checks.yml +++ /dev/null @@ -1,181 +0,0 @@ -# Required checks with path filtering rules will block pull requests from merging if they change only the excluded files. -# This is a workaround to allow the PR to be merged. -# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks -name: Driver Tests - -on: - push: - branches: - - 'master' - - 'release-**' - paths: - - "docs/**" - - "**.md" - # frontend and E2E tests - - "**/frontend/test/**" - - "**/frontend/**.unit.*" - pull_request: - paths: - - "docs/**" - - "**.md" - # frontend and E2E tests - - "**/frontend/test/**" - - "**/frontend/**.unit.*" - -jobs: - - be-tests-athena-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-bigquerycloud-sdk-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-druid-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-googleanalytics-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-google-related-classpath-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-mariadb-10-2-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-mariadb-latest-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-mongo-4-2-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-mongo-4-2-ssl-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-mongo-5-0-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-mongo-5-0-ssl-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-mongo-latest-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-mysql-5-7-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-mysql-latest-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-oracle-18-4-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-oracle-21-3-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-postgres-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-postgres-latest-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-presto-186-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-presto-jdbc-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-redshift-jdbc-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-snowflake-jdbc-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-sparksql-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-sqlite-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-sqlserver-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" - - be-tests-vertica-ee: - runs-on: ubuntu-20.04 - steps: - - run: | - echo "Didn't run due to conditional filtering" diff --git a/.github/workflows/drivers.yml b/.github/workflows/drivers.yml index 276b1ced7b46cc5d701d84dd4f4f13abf65828f9..b0f92db3137aa4d1f6f5b6798b4395877d2159c9 100644 --- a/.github/workflows/drivers.yml +++ b/.github/workflows/drivers.yml @@ -5,29 +5,32 @@ on: branches: - 'master' - 'release-**' - paths-ignore: - - "docs/**" - - "**.md" - # frontend and E2E tests - - "**/frontend/test/**" - - "**/frontend/**.unit.*" pull_request: types: [opened, synchronize, reopened, ready_for_review] - paths-ignore: - - "docs/**" - - "**.md" - # frontend and E2E tests - - "**/frontend/test/**" - - "**/frontend/**.unit.*" concurrency: group: ${{ github.head_ref || github.run_id}} cancel-in-progress: true jobs: + files-changed: + name: Check which files changed + runs-on: ubuntu-20.04 + timeout-minutes: 3 + outputs: + backend_all: ${{ steps.changes.outputs.backend_all }} + steps: + - uses: actions/checkout@v3 + - name: Test which files changed + uses: dorny/paths-filter@v2.11.1 + id: changes + with: + token: ${{ github.token }} + filters: .github/file-paths.yaml be-tests-athena-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -46,7 +49,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-bigquery-cloud-sdk-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -67,7 +71,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-druid-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: buildjet-2vcpu-ubuntu-2004 timeout-minutes: 60 env: @@ -89,7 +94,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-googleanalytics-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -104,7 +110,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-google-related-classpath-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 strategy: @@ -128,7 +135,8 @@ jobs: test-args: ':only "[metabase.query-processor-test.expressions-test metabase.driver.google-test metabase.driver.googleanalytics-test]"' be-tests-mariadb-10-2-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -153,7 +161,8 @@ jobs: junit-name: 'be-tests-mariadb-10-2-ee' be-tests-mariadb-latest-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -178,7 +187,8 @@ jobs: junit-name: 'be-tests-mariadb-latest-ee' be-tests-mongo-4-2-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -200,7 +210,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-mongo-4-2-ssl-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -234,7 +245,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-mongo-5-0-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -256,7 +268,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-mongo-5-0-ssl-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -290,7 +303,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-mongo-latest-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -315,7 +329,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-mysql-5-7-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -340,7 +355,8 @@ jobs: junit-name: 'be-tests-mysql-5-7-ee' be-tests-mysql-latest-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -377,7 +393,8 @@ jobs: junit-name: 'be-tests-mysql-latest-ee' be-tests-oracle-18-4-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -403,7 +420,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-oracle-21-3-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -438,7 +456,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-postgres-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -466,7 +485,8 @@ jobs: junit-name: 'be-tests-postgres-ee' be-tests-postgres-latest-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -498,7 +518,8 @@ jobs: junit-name: 'be-tests-postgres-latest-ee' be-tests-presto-186-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -520,7 +541,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-presto-jdbc-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -571,7 +593,8 @@ jobs: run: cat /sys/fs/cgroup/memory/memory.max_usage_in_bytes be-tests-redshift-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -590,7 +613,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-snowflake-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -611,7 +635,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-sparksql-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: buildjet-2vcpu-ubuntu-2004 timeout-minutes: 60 env: @@ -631,7 +656,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-sqlite-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -646,7 +672,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-sqlserver-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: @@ -673,7 +700,8 @@ jobs: test-args: ":exclude-tags '[:mb/once]'" be-tests-vertica-ee: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 60 env: diff --git a/.github/workflows/e2e-tests-skipped-checks.yml b/.github/workflows/e2e-tests-skipped-checks.yml deleted file mode 100644 index a3a0f96dbe4e2bb7739cc7a7f567334317505843..0000000000000000000000000000000000000000 --- a/.github/workflows/e2e-tests-skipped-checks.yml +++ /dev/null @@ -1,51 +0,0 @@ -# Required checks with path filtering rules will block pull requests from merging if they change only the excluded files. -# This is a workaround to allow the PR to be merged. -# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks -name: E2E Tests for PR - -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - paths: - - "docs/**" - - "**.md" - - ".circleci/**" - - "**.unit.spec.*" - - "**_test.clj" - -jobs: - e2e-tests: - runs-on: ubuntu-latest - name: e2e-tests-${{ matrix.folder }}${{ matrix.context }}-${{ matrix.edition }} - 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 - steps: - - run: | - echo "Didn't run due to conditional filtering" diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 56db44a17ad4865c1de46bdbfb778caa53736801..4498779d20432a890a4b4c9bec168358fd1c45e2 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -3,21 +3,30 @@ name: E2E Tests for PR on: pull_request: types: [opened, synchronize, reopened, ready_for_review] - paths-ignore: - - "docs/**" - - "**.md" - - ".circleci/**" - - "**.unit.spec.*" - - "**_test.clj" concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: + files-changed: + name: Check which files changed + runs-on: ubuntu-20.04 + timeout-minutes: 3 + outputs: + e2e_all: ${{ steps.changes.outputs.e2e_all }} + steps: + - uses: actions/checkout@v3 + - name: Test which files changed + uses: dorny/paths-filter@v2.11.1 + id: changes + with: + token: ${{ github.token }} + filters: .github/file-paths.yaml build: - if: github.event.pull_request.draft == false + needs: files-changed + if: github.event.pull_request.draft == false && needs.files-changed.outputs.e2e_all == 'true' runs-on: ubuntu-20.04 timeout-minutes: 25 strategy: @@ -27,23 +36,27 @@ jobs: 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-tests + - 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-tests - - run: ./bin/build version translations frontend licenses drivers uberjar + - run: ./bin/build version translations frontend licenses drivers uberjar - - name: Prepare uberjar artifact - uses: ./.github/actions/prepare-uberjar-artifact + - name: Prepare uberjar artifact + uses: ./.github/actions/prepare-uberjar-artifact e2e-tests: + needs: [build, files-changed] + if: | + always() && + needs.files-changed.outputs.e2e_all == 'true' && + (needs.build.result == 'success' || needs.build.result == 'skipped') runs-on: ubuntu-20.04 timeout-minutes: 45 - needs: build name: e2e-tests-${{ matrix.folder }}${{ matrix.context }}-${{ matrix.edition }} env: MB_EDITION: ${{ matrix.edition }} @@ -51,8 +64,8 @@ jobs: 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 + MB_SNOWPLOW_URL: "http://localhost:9090" # Snowplow micro + ELECTRON_EXTRA_LAUNCH_ARGS: "--remote-debugging-port=40500" # deploysentinel strategy: fail-fast: false matrix: @@ -120,60 +133,102 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} steps: - - uses: actions/checkout@v3 - - name: Set conditional ENVs - run: | - if [[ ${{ github.event.pull_request.base.ref }} != release* ]]; then - echo "CYPRESS_DEPLOYSENTINEL_KEY=${{ secrets.CYPRESS_DEPLOYSENTINEL_KEY }}" >> $GITHUB_ENV - fi - - 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/checkout@v3 + - name: Set conditional ENVs + run: | + if [[ ${{ github.event.pull_request.base.ref }} != release* ]]; then + echo "CYPRESS_DEPLOYSENTINEL_KEY=${{ secrets.CYPRESS_DEPLOYSENTINEL_KEY }}" >> $GITHUB_ENV + fi + - 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/ + - 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 + - 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 - - name: Run EE Cypress tests on ${{ matrix.folder }} - if: matrix.edition == 'ee' - run: | - yarn run test-cypress-run \ - --env grepTags="-@quarantine" \ - --folder ${{ matrix.folder }} - env: - TERM: xterm + - name: Run EE Cypress tests on ${{ matrix.folder }} + if: matrix.edition == 'ee' + run: | + yarn run test-cypress-run \ + --env grepTags="-@quarantine" \ + --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 + - 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 + + e2e-tests-skipped-stub: + needs: [build, files-changed] + if: | + always() && + needs.files-changed.outputs.e2e_all == 'false' && + needs.build.result == 'skipped' + runs-on: ubuntu-20.04 + timeout-minutes: 5 + name: e2e-tests-${{ matrix.folder }}${{ matrix.context }}-${{ matrix.edition }} + 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 + steps: + - run: | + echo "Didn't run due to conditional filtering" visual-regression-tests: runs-on: ubuntu-20.04 @@ -197,24 +252,24 @@ jobs: 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/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 + - 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