-
Notifications
You must be signed in to change notification settings - Fork 2
89 lines (88 loc) · 3.04 KB
/
unit-tests.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Unit tests
on:
push:
branches:
- main
pull_request:
# TODO uncomment when the workflow gets stable.
# paths:
# - macros/
# - integration_tests/macros/
jobs:
test:
runs-on: ubuntu-latest
env:
DBT_DATA_PRIVACY_TEST_PROJECT: "${{ secrets.DBT_DATA_PRIVACY_TEST_PROJECT }}"
strategy:
fail-fast: false
matrix:
include:
- pip-requirements: "requirements-1.0.txt"
python-version: "3.9"
- pip-requirements: "requirements-1.1.txt"
python-version: "3.9"
- pip-requirements: "requirements-1.2.txt"
python-version: "3.9"
- pip-requirements: "requirements-1.2.txt"
python-version: "3.10"
- pip-requirements: "requirements-1.3.txt"
python-version: "3.9"
- pip-requirements: "requirements-1.3.txt"
python-version: "3.10"
- pip-requirements: "requirements-1.4.txt"
python-version: "3.9"
- pip-requirements: "requirements-1.4.txt"
python-version: "3.10"
- pip-requirements: "requirements-1.4.txt"
python-version: "3.11"
- pip-requirements: "requirements-1.5.txt"
python-version: "3.9"
- pip-requirements: "requirements-1.5.txt"
python-version: "3.10"
- pip-requirements: "requirements-1.5.txt"
python-version: "3.11"
- pip-requirements: "requirements-1.6.txt"
python-version: "3.9"
- pip-requirements: "requirements-1.6.txt"
python-version: "3.10"
- pip-requirements: "requirements-1.6.txt"
python-version: "3.11"
- pip-requirements: "requirements-1.7.txt"
python-version: "3.9"
- pip-requirements: "requirements-1.7.txt"
python-version: "3.10"
- pip-requirements: "requirements-1.7.txt"
python-version: "3.11"
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pip
run: |
pip install -U pip==23.0.1
- name: Install dbt
working-directory: "${{ github.workspace }}/integration_tests"
run: |
# Use 'legacy-resolver' to speed up
pip install -r "requirements/${{ matrix.pip-requirements }}" --use-deprecated "legacy-resolver"
- name: Run unit tests
working-directory: "${{ github.workspace }}/integration_tests"
run: |
bash run_unit_tests.sh
# Save artifacts for debug
- name: Save logs and artifacts if failed
if: always()
uses: actions/upload-artifact@v3
with:
name: save-logs-and-target-${{ matrix.python-version }}-${{ matrix.pip-requirements }}
retention-days: 3
path: |
integration_tests/logs
integration_tests/target
- id: exit
run: exit ${{ steps.apply.outputs.exitcode }}