Skip to content

feat: add integration test on CI #79

feat: add integration test on CI

feat: add integration test on CI #79

Workflow file for this run

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 build \
--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 }} \
.
- name: Run Docker container
run: |
docker run \
-d \
--name dbt-af-container-${{ matrix.airflow-version }}-py${{ matrix.python-version }} \
dbt-af-${{ matrix.airflow-version }}-py${{ matrix.python-version }}
- name: Run tests
run: |
docker exec \
dbt-af-container-${{ matrix.airflow-version }}-py${{ matrix.python-version }} \
airflow db migrate && \
pytest -q -s -vv --log-cli-level=INFO --cov=dbt_af --cov-report=term --run-airflow-tasks tests