Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
laysabit committed Mar 13, 2024
1 parent 2546594 commit 671f6a8
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 9 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
push:
branches:
- diff-quality
env:
DBT_DEFAULT_PROFILE_TARGET: stellar_dbt_public
DBT_PROFILES_DIR: ${{ github.workspace }}
DBT_TARGET: development
DBT_MAX_BYTES_BILLED: 1000000000000
DBT_JOB_TIMEOUT: 300
DBT_THREADS: 1
DBT_JOB_RETRIES: 1
# env:
# DBT_DEFAULT_PROFILE_TARGET: stellar_dbt_public
# DBT_PROFILES_DIR: ${{ github.workspace }}
# DBT_TARGET: development
# DBT_MAX_BYTES_BILLED: 1000000000000
# DBT_JOB_TIMEOUT: 300
# DBT_THREADS: 1
# DBT_JOB_RETRIES: 1

jobs:
build:
Expand Down Expand Up @@ -39,6 +39,10 @@ jobs:
project_id: crypto-stellar
credentials_json: "${{ secrets.CREDS_PROD_HUBBLE }}"

- name: Set up dbt profile
run: |
. ci_profiles.sh
- name: Checkout source branch and diff quality
run: |
git checkout ${{ github.ref_name }}
Expand Down
2 changes: 1 addition & 1 deletion .sqlfluff
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ project_dir = ./
# If your project works only with .env files you need to:
### Change ~/.dbt/ for ./ on profiles_dir variable here
### Remove steps on the pipeline that create and copy the profiles.yml to ~/.dbt/ folder.
profiles_dir = ./
profiles_dir = ~/.dbt/
# Name of the profiles.
# CHANGE THIS TO THE PROFILE NAME ON YOUR PROFILES.YML FILE
profile = stellar_dbt
Expand Down
26 changes: 26 additions & 0 deletions ci_profiles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

set -e

echo "writing file profiles.yml"
mkdir ~/.dbt

echo "stellar_dbt_public:" >> ~/.dbt/profiles.yml
echo " target: development" >> ~/.dbt/profiles.yml
echo " outputs:" >> ~/.dbt/profiles.yml
echo " development:" >> ~/.dbt/profiles.yml
echo " dataset: crypto_stellar" >> ~/.dbt/profiles.yml
echo " maximum_bytes_billed: 1000000000000" >> ~/.dbt/profiles.yml
echo " job_execution_timeout_seconds: 300" >> ~/.dbt/profiles.yml
echo " job_retries: 1" >> ~/.dbt/profiles.yml
echo " location: us" >> ~/.dbt/profiles.yml
echo " priority: interactive" >> ~/.dbt/profiles.yml
echo " project: crypto-stellar" >> ~/.dbt/profiles.yml
echo " threads: 1" >> ~/.dbt/profiles.yml
echo " type: bigquery" >> ~/.dbt/profiles.yml
echo " method: oauth" >> ~/.dbt/profiles.yml

dbt deps

echo "starting dbt docs generate"
dbt docs generate --profiles-dir ~/.dbt

0 comments on commit 671f6a8

Please sign in to comment.