-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
85 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
name: CI | ||
|
||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
pull_request: | ||
branches: [ main ] | ||
|
||
workflow_call: | ||
inputs: | ||
target: | ||
type: string | ||
required: true | ||
gcp_keyfile_path: | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
build: | ||
ci: | ||
runs-on: ubuntu-latest | ||
env: | ||
DBT_PROFILES_DIR: . # Use integration_tests/profiles.yml | ||
|
||
steps: | ||
- name: Checkout Branch | ||
uses: actions/checkout@v2 | ||
- name: Build dbt Integration Tests Project | ||
with: | ||
target: ${{ inputs.target }} | ||
env: | ||
GCP_KEYFILE_PATH: ${{ inputs.gcp_keyfile_path }} | ||
DBT_PROFILES_DIR: . # Use integration_tests/profiles.yml | ||
run: | | ||
cd ./integration_tests | ||
dbt build -x --target ${{ inputs.target }} | ||
|
||
|
||
- name: CI in Dockerfile | ||
uses: ./.github/actions/run_ci |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI - Pull Request | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
setup: | ||
uses: ./.github/workflows/setup.yml | ||
secrets: | ||
gcp_keyfile: ${{ secrets.GCP_KEYFILE }} | ||
gcp_keyfile_path: ./integration_tests/gcp_keyfile.json | ||
|
||
duckdb: | ||
needs: [ setup ] | ||
uses: ./.github/workflows/ci.yml | ||
with: | ||
target: bigquery | ||
gcp_keyfile_path: ./integration_tests/gcp_keyfile.json | ||
|
||
bigquery: | ||
needs: [ setup ] | ||
uses: ./.github/workflows/ci.yml | ||
with: | ||
target: bigquery | ||
gcp_keyfile_path: ./integration_tests/gcp_keyfile.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Setup | ||
on: | ||
workflow_call: | ||
inputs: | ||
target: | ||
type: string | ||
required: true | ||
gcp_keyfile_path: | ||
type: string | ||
required: true | ||
secrets: | ||
gcp_keyfile: | ||
required: true | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
env: | ||
GCP_KEYFILE: ${{ secrets.gcp_keyfile }} | ||
|
||
steps: | ||
- name: Checkout Branch | ||
uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install Poetry | ||
run: curl -sSL https://install.python-poetry.org | python - | ||
- name: Install Python Dependencies | ||
run: poetry install --no-interaction | ||
- name: Publish GCP Keyfile | ||
run: echo $GCP_KEYFILE > ${{ inputs.gcp_keyfile_path }} | ||
- name: dbt deps | ||
run: | | ||
cd ./integration_tests | ||
dbt deps |