-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from DalgoT4D/feature/ci-cd_pipeline
add the ci cd pipeline for testing
- Loading branch information
Showing
4 changed files
with
66 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Our first dbt PR job | ||
#updates | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
push: | ||
branches: | ||
- '!main' | ||
|
||
jobs: | ||
dbt_ci: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set Up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install requirements | ||
run: pip install -r requirements.txt | ||
|
||
- name: Install dbt dependencies | ||
run: dbt deps | ||
|
||
- name: dbt build | ||
run: dbt build --full-refresh --profiles-dir ./ | ||
env: | ||
POSTGRES_DBNAME: ${{ secrets.POSTGRES_DBNAME }} | ||
POSTGRES_USER: ${{ secrets.POSTGRES_USER }} | ||
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | ||
POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }} | ||
|
||
- name: Benchmarking models | ||
run: "sqlfluff lint models --bench" | ||
|
||
- name: Lint models | ||
run: "sqlfluff lint models -f human" |
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,11 @@ | ||
# https://docs.sqlfluff.com/en/stable/configuration.html#default-configuration | ||
|
||
[sqlfluff] | ||
# Supported dialects https://docs.sqlfluff.com/en/stable/dialects.html | ||
# Or run 'sqlfluff dialects' | ||
dialect = postgres | ||
templater = dbt | ||
|
||
# Comma separated list of rules to exclude, or None | ||
exclude_rules = L001,L029,RF05, LT05, ST06, RF02 | ||
#max_line_length = 120 |
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,7 @@ | ||
# dbt output files | ||
target/ | ||
dbt_packages/ | ||
|
||
# other | ||
analysis/ | ||
macros/ |
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,3 @@ | ||
sqlfluff==3.2.5 | ||
dbt-postgres==1.7.17 | ||
sqlfluff-templater-dbt==3.2.5 |