5 models of building footprints data joined with Tiger Data #199
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
name: pre-commit | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
DBT_PROFILES_DIR: ../ci | |
PRIVATE_KEY: ${{ SECRETS.SNOWFLAKE_PRIVATE_KEY }} | |
SNOWFLAKE_PRIVATE_KEY_PATH: /tmp/private_key.p8 | |
SNOWFLAKE_USER: GITHUB_ACTIONS_SVC_USER_DEV | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
- uses: actions/setup-python@v3 | |
- name: Setup terraform | |
uses: hashicorp/setup-terraform@v2 | |
with: | |
terraform_version: v1.4.0 | |
- name: Install tflint | |
run: | | |
curl -s https://raw.githubusercontent.com/terraform-linters/\ | |
tflint/master/install_linux.sh | bash | |
- 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`, but not good enough for | |
# `dbt docs generate`. Should we want to do more detailed checks | |
# at some point, we should revisit the service account permissions. | |
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }} | |
export_environment_variables: true | |
- uses: actions/setup-python@v3 | |
# 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 | |
- uses: pre-commit/[email protected] |