-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (37 loc) · 1.18 KB
/
tests.yaml
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
---
name: Tests
run-name: Run project tests
on: ["pull_request", "workflow_dispatch"]
env:
DBT_PROJECT_DIR: ${{ vars.DBT_PROJECT_DIR }}
DBT_PROFILES_DIR: ${{ vars.DBT_PROFILES_DIR }}
concurrency:
group: ${{ github.ref }}
cancel-in-progress: false
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: 📦 Set up Poetry
run: pipx install poetry==1.8.2
- name: Python setup 🐍
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dbt ⬇️
run: poetry install
- name: Create mock database 🤡
run: >
poetry run python -c
"import duckdb; con = duckdb.connect('$GITHUB_WORKSPACE/billiam_database/billiam.duckdb'); con.close()"
- name: Install dbt dependencies ➕
run: |
poetry run dbt clean --no-clean-project-files-only
poetry run dbt deps
poetry run dbt run-operation set_ci_environment
- name: Parse dbt 🗃️
run: poetry run dbt parse
- name: Run dbt unit tests 🧪
run: poetry run dbt test --select tag:unit-test