From 18283801f6d0c88efff49f8f3496a1e229af8725 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Tue, 24 Sep 2024 11:55:31 +0300 Subject: [PATCH] chore(ci): run cloud db drivers tests only when credentials are set (#8736) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(ci): run cloud db drivers tests only when credentials are set * remove config-inline in publish/docker-push as actionlint is complaining and this option is already not supported for some time --- .github/workflows/drivers-tests.yml | 11 +++++++++++ .github/workflows/publish.yml | 4 ---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/drivers-tests.yml b/.github/workflows/drivers-tests.yml index 8d35f04b97d5f..41e6734ef6044 100644 --- a/.github/workflows/drivers-tests.yml +++ b/.github/workflows/drivers-tests.yml @@ -174,6 +174,13 @@ jobs: timeout-minutes: 30 needs: [latest-tag-sha, build] if: (needs['latest-tag-sha'].outputs.sha != github.sha) + env: + CLOUD_DATABASES: athena bigquery databricks-jdbc databricks-jdbc-export-bucket snowflake + # As per docs: + # Secrets cannot be directly referenced in if: conditionals. Instead, consider setting + # secrets as job-level environment variables, then referencing the environment variables + # to conditionally run steps in the job. + DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY: ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }} strategy: matrix: node: @@ -239,6 +246,10 @@ jobs: - name: Run tests uses: nick-fields/retry@v3 + # It's enough to test for any one secret because they are set all at once or not set all + if: | + (contains(env.CLOUD_DATABASES, matrix.database) && env.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY != '') || + (!contains(env.CLOUD_DATABASES, matrix.database)) env: # Athena DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY: ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 68cfc92d1d5ad..9dcbda2011e93 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -381,10 +381,6 @@ jobs: org.opencontainers.image.created=${{ steps.prep.outputs.created }} org.opencontainers.image.revision=${{ github.sha }} org.opencontainers.image.licenses=${{ fromJson(steps.repo.outputs.result).license.spdx_id }} - # Workaround for yarn v1, it uses aggressive timeouts with summing time spending on fs, https://github.com/yarnpkg/yarn/issues/4890 - config-inline: | - [worker.oci] - max-parallelism = 1 build-args: | IMAGE_VERSION=${{ steps.prep.outputs.version }}