-
-
Notifications
You must be signed in to change notification settings - Fork 8
41 lines (37 loc) · 1.39 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
name: Tests
on:
pull_request:
branches: [ main ]
jobs:
test:
runs-on: [ ubuntu-latest ]
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11" ]
airflow-version: [ "2.6.3", "2.7.3", "2.8.4", "2.9.3", "2.10.0", "2.10.1", "2.10.2", "2.10.3", "2.10.4" ]
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: |
docker buildx build \
--cache-to type=gha \
--cache-from type=gha \
--build-arg AIRFLOW_USE_UV="true" \
--build-arg AIRFLOW_VERSION=${{ matrix.airflow-version }} \
--build-arg PYTHON_VERSION=${{ matrix.python-version }} \
--target airflow-dbt-af-ci \
-t dbt-af-${{ matrix.airflow-version }}-py${{ matrix.python-version }}-ci \
.
- name: Run Docker container
run: |
docker run \
-d \
--name dbt-af-container-${{ matrix.airflow-version }}-py${{ matrix.python-version }}-ci \
dbt-af-${{ matrix.airflow-version }}-py${{ matrix.python-version }}-ci
- name: Run tests
run: |
docker exec \
dbt-af-container-${{ matrix.airflow-version }}-py${{ matrix.python-version }}-ci \
airflow db migrate && \
pytest -q -s -vv --log-cli-level=INFO --cov=dbt_af --cov-report=term --run-airflow-tasks tests