-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.4 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: test
on:
pull_request:
push:
branches:
- main
permissions:
contents: write
env:
DBT_PROFILES_DIR: ci
SNOWFLAKE_PRIVATE_KEY: ${{ SECRETS.SNOWFLAKE_PRIVATE_KEY }}
SNOWFLAKE_USER: ${{ SECRETS.SNOWFLAKE_USER }}
SNOWFLAKE_ACCOUNT: ${{ SECRETS.SNOWFLAKE_ACCOUNT }}
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
- name: Test template
run: ./caldata-infrastructure-template/ci/test.sh