-
Notifications
You must be signed in to change notification settings - Fork 23
60 lines (49 loc) · 1.63 KB
/
dbt-compatible-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
49
50
51
52
53
54
55
56
57
58
59
60
name: Run dbt tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [ '3.8', '3.9', '3.10', '3.11' ]
dbt: [ ">=1.3,<1.4", ">=1.4,<1.5", ">=1.5,<1.6", ">=1.6,<1.7", ">=1.7,<1.8" ]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest "dbt-core${{ matrix.dbt }}"
pip install '.[duckdb]'
- name: Run tests
run: |
set +e
output=$(python -c "from dbt import version as v" 2>&1)
exit_code=$?
set -e
if [ $exit_code -eq 0 ]; then
python -mpytest tests/test_dbt_manifest_compatible.py tests/test_dbt_integeration.py tests/test_dbt_util.py
else
# https://github.com/dbt-labs/dbt-core/issues/6203#issuecomment-1319112890
echo "Skip! dbt-core v1.3 only works with python less than 3.11"
fi
- name: Run jaffle shop
if: matrix.dbt != '>=1.3,<1.4'
run: |
pip install "dbt-duckdb${{ matrix.dbt }}"
./e2e-jaffle-shop/run.sh
path="/home/runner/work/piperider/piperider/e2e-jaffle-shop/jaffle_shop/.piperider/comparisons/latest/summary.md"
if [ ! -e "$path" ]; then
echo "The path '$path' does not exist."
exit 1
fi