v0.36.2 #3535
This file contains 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
# CAUTION: This workflow exposes secrets. It is only supposed to be run on "merge into master" condition. | |
name: 'Cloud Tests' | |
on: | |
# push doesn't work for PRs, it's safe to use it | |
# only maintainers/core contributors are allowed to push directly to the main repository | |
push: | |
paths: | |
- '.github/actions/integration/athena.sh' | |
- '.github/actions/integration/bigquery.sh' | |
- '.github/actions/integration/snowflake.sh' | |
- '.github/workflows/cloud.yml' | |
- 'packages/cubejs-testing/**' | |
- 'packages/cubejs-testing-shared/**' | |
- 'packages/cubejs-backend-shared/**' | |
- 'packages/cubejs-base-driver/**' | |
- 'packages/cubejs-query-orchestrator/**' | |
- 'packages/cubejs-schema-compiler/**' | |
- 'packages/cubejs-backend-shared/**' | |
- 'packages/cubejs-server-core/**' | |
# drivers | |
- 'packages/cubejs-athena-driver/**' | |
- 'packages/cubejs-bigquery-driver/**' | |
- 'packages/cubejs-snowflake-driver/**' | |
- 'lerna.json' | |
- 'package.json' | |
- 'yarn.lock' | |
jobs: | |
latest-tag-sha: | |
runs-on: ubuntu-20.04 | |
outputs: | |
sha: ${{ steps.get-tag.outputs.sha }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: git-log | |
run: git log HEAD~30..HEAD | |
- id: get-tag-test | |
run: echo "$SHA $(git rev-list -n 1 "$(git tag --contains "$SHA")")" | |
env: | |
SHA: ${{ github.sha }} | |
- id: get-tag | |
run: echo "sha=$(git rev-list -n 1 "$(git tag --contains "$SHA")")" >> "$GITHUB_OUTPUT" | |
env: | |
SHA: ${{ github.sha }} | |
- id: get-tag-out | |
run: echo "$OUT" | |
env: | |
OUT: ${{ steps.get-tag.outputs.sha }} | |
integration-cloud: | |
needs: latest-tag-sha | |
if: (needs['latest-tag-sha'].outputs.sha != github.sha) | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
node-version: [ 20.x ] | |
db: [ 'athena', 'bigquery', 'snowflake' ] | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT" | |
shell: bash | |
- name: Restore yarn cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Set Yarn version | |
run: yarn policies set-version v1.22.22 | |
- name: Yarn install | |
run: CUBESTORE_SKIP_POST_INSTALL=true yarn install --frozen-lockfile | |
- name: Build client | |
run: yarn build | |
- name: Lerna tsc | |
run: yarn tsc | |
- name: Run Integration tests for ${{ matrix.db }} matrix | |
timeout-minutes: 30 | |
env: | |
CUBEJS_DB_BQ_CREDENTIALS: ${{ secrets.CUBEJS_DB_BQ_CREDENTIALS }} | |
CUBEJS_AWS_KEY: ${{ secrets.CUBEJS_AWS_KEY }} | |
CUBEJS_AWS_SECRET: ${{ secrets.CUBEJS_AWS_SECRET }} | |
CUBEJS_DB_USER: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_USER }} | |
CUBEJS_DB_PASS: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_PASS }} | |
run: ./.github/actions/integration/${{ matrix.db }}.sh |