-
-
Notifications
You must be signed in to change notification settings - Fork 8
40 lines (35 loc) · 1.22 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
name: Tests
on:
pull_request:
branches: [ main ]
jobs:
test:
runs-on: [ ubuntu-latest ]
strategy:
fail-fast: false
matrix:
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" ]
python-version: [ "3.10", "3.11" ]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker build
uses: docker/build-push-action@v6
with:
context: .
outputs: type=docker
push: false
tags: "dbt-af-${{ matrix.airflow-version }}-py${{ matrix.python-version }}-ci"
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
AIRFLOW_USE_UV="true"
AIRFLOW_VERSION=${{ matrix.airflow-version }}
PYTHON_VERSION=${{ matrix.python-version }}
- name: Run tests in container
run: |
docker run \
--entrypoint="" \
dbt-af-${{ matrix.airflow-version }}-py${{ matrix.python-version }}-ci \
airflow db migrate && poetry run pytest -q -s -vv --log-cli-level=INFO --cov=dbt_af --cov-report=term --run-airflow-tasks tests