Skip to content

feat: add integration test on CI #101

feat: add integration test on CI

feat: add integration test on CI #101

Workflow file for this run

name: Tests
on:
pull_request:
branches: [ main ]
jobs:
codestyle_check:
name: Codestyle
uses: ./.github/workflows/test_code_style.yml
secrets: inherit
permissions: write-all
integration_tests:
runs-on: [ ubuntu-latest ]
name: Integration tests
strategy:
fail-fast: false
matrix:
airflow-version: [ "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 }}
PY_VERSION=${{ matrix.python-version }}
- name: Run tests in container
run: |
docker run \
--entrypoint="" \
dbt-af-${{ matrix.airflow-version }}-py${{ matrix.python-version }}-ci \
bash -c "pytest -q -s -vv --log-cli-level=INFO --cov=dbt_af --cov-report=term --run-airflow-tasks tests"
required-collector-job:
needs:
[
codestyle_check,
integration_tests,
]
if: github.event_name != 'push' && always()
name: Required Checks
runs-on: ubuntu-latest
steps:
- name: Check for failures
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1