Skip to content

Merge pull request #28 from cagov/remove_new_line_rule #96

Merge pull request #28 from cagov/remove_new_line_rule

Merge pull request #28 from cagov/remove_new_line_rule #96

Workflow file for this run

name: test
on:
pull_request:
push:
branches:
- main
permissions:
contents: write
env:
DBT_PROFILES_DIR: ci
PRIVATE_KEY: ${{ SECRETS.SNOWFLAKE_PRIVATE_KEY }}
SNOWFLAKE_USER: ${{ SECRETS.SNOWFLAKE_USER }}
SNOWFLAKE_ACCOUNT: ${{ SECRETS.SNOWFLAKE_ACCOUNT }}
SNOWFLAKE_PRIVATE_KEY_PATH: /tmp/private_key.p8
defaults:
run:
shell: bash -l {0}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: caldata-infrastructure-template
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- id: auth
name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
# The credentials here can read metadata only, which makes them
# good enough for `dbt compile`. It really shouldn't be necessary
# to have a live connection to compile the sample model, but unfortunately
# dbt seems to require it.
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
- name: Setup git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Install dependencies
run: |
pip install copier poetry
poetry config virtualenvs.in-project true
# TODO: once we are on dbt-snowflake 1.5, no need to pipe to a file, we can
# just use $SNOWFLAKE_PRIVATE_KEY
- name: Set up private key
run: echo "$PRIVATE_KEY" > $SNOWFLAKE_PRIVATE_KEY_PATH
- name: Test template
run: ./caldata-infrastructure-template/ci/test.sh