Skip to content

profiles.yml will create it on the fly #65

profiles.yml will create it on the fly

profiles.yml will create it on the fly #65

Workflow file for this run

name: Our first dbt PR job
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: Create profiles.yml
run: |
mkdir -p ~/.dbt
cat <<EOF > ~/.dbt/profiles.yml
default:
target: dev
outputs:
dev:
type: postgres
host: ${{ secrets.POSTGRES_HOST }}
user: ${{ secrets.POSTGRES_USER }}
password: ${{ secrets.POSTGRES_PASSWORD }}
dbname: ${{ secrets.POSTGRES_DBNAME }}
schema: public
threads: 4
port: 5432
sslmode: prefer
EOF
- name: Install dbt dependencies
run: dbt deps
- name: dbt build
run: dbt build --full-refresh
env:
DBT_PROFILES_DIR: ~/.dbt
- name: Benchmarking models
run: sqlfluff lint models --bench
- name: Lint models
run: sqlfluff lint models -f human