Skip to content

Execute on push to test workflow #2

Execute on push to test workflow

Execute on push to test workflow #2

Workflow file for this run

name: CI
on:
pull_request:
push:
jobs:
dbt-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install -r requirements.txt
- name: Set up Snowflake profile
env:
SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
SNOWFLAKE_DATABASE: ${{ secrets.SNOWFLAKE_DATABASE }}
SNOWFLAKE_WAREHOUSE: ${{ secrets.SNOWFLAKE_WAREHOUSE }}
SNOWFLAKE_ROLE: ${{ secrets.SNOWFLAKE_ROLE }}
run: |
mkdir -p ~/.dbt/
echo "snowflake:" >> ~/.dbt/profiles.yml
echo " target: dev" >> ~/.dbt/profiles.yml
echo " outputs:" >> ~/.dbt/profiles.yml
echo " dev:" >> ~/.dbt/profiles.yml
echo " type: snowflake" >> ~/.dbt/profiles.yml
echo " account: $SNOWFLAKE_ACCOUNT" >> ~/.dbt/profiles.yml
echo " user: $SNOWFLAKE_USER" >> ~/.dbt/profiles.yml
echo " password: $SNOWFLAKE_PASSWORD" >> ~/.dbt/profiles.yml
echo " role: $SNOWFLAKE_ROLE" >> ~/.dbt/profiles.yml
echo " database: $SNOWFLAKE_DATABASE" >> ~/.dbt/profiles.yml
echo " warehouse: $SNOWFLAKE_WAREHOUSE" >> ~/.dbt/profiles.yml
echo " schema: dbt_metrics_ci" >> ~/.dbt/profiles.yml
- name: Install dbt Dependencies
run: dbt deps
- name: Instantiate Jaffle Shop data
run: dbt seed
- name: dbt Build
run: dbt build
- name: Validate Semantic Models
run: mf validate-configs