Skip to content

Commit

Permalink
chore(ci): run cloud db drivers tests only when credentials are set (#…
Browse files Browse the repository at this point in the history
…8736)

* 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
  • Loading branch information
KSDaemon authored Sep 24, 2024
1 parent cb9bb70 commit 1828380
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/drivers-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 1828380

Please sign in to comment.