-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (56 loc) · 1.42 KB
/
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
name: tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
dbt_core: [1.4.*, 1.6.*]
db_target: [dbt-duckdb, dbt-postgres]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: "3.10"
architecture: x64
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.0
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install
chmod +x ./run
./run setup
pip install -U "dbt-core==$DBT_CORE_VERSION" "${DBT_PROVIDER_PACKAGE}"
env:
DBT_CORE_VERSION: ${{ matrix.dbt_core }}
DBT_PROVIDER_PACKAGE: ${{ matrix.db_target }}
- name: Lint
run: ./run lint
- name: Test
run: ./run test "${DBT_TARGET}"
env:
DBT_TARGET: ${{ matrix.db_target }}
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres