Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 15 additions & 17 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ jobs:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
airflow-version: ['1.10.15', '2.0.2', '2.2.5']
airflow-version: ['1.10.15', '2.2.2', '2.4.2']
exclude:
- python-version: '3.10'
airflow-version: '2.0.2'
- python-version: '3.10'
airflow-version: '1.10.15'
- python-version: '3.10'
airflow-version: '2.2.2'
include:
- airflow-version: '1.10.15'
constraints: 'constraints-3.8.txt'
install: 'apache-airflow[amazon]==1.10.15'

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -46,27 +51,20 @@ jobs:
- name: Code formatting with black
run: poetry run black --check .

- name: Install Airflow > 2
if: matrix.airflow-version != '1.10.15' && matrix.python-version != '3.10'
- name: Install Airflow with constraints
if: ${{ matrix.constraints }}
run: |
wget https://raw.githubusercontent.com/apache/airflow/constraints-${{ matrix.airflow-version }}/constraints-${{ matrix.python-version }}.txt -O constraints.txt
poetry run pip install apache-airflow==${{ matrix.airflow-version }} apache-airflow-providers-amazon -c constraints.txt
wget https://raw.githubusercontent.com/apache/airflow/constraints-${{ matrix.airflow-version }}/${{ matrix.constraints }} -O constraints.txt
poetry run pip install ${{ matrix.install }} -c constraints.txt
poetry run airflow db init

- name: Install Airflow > 2
if: matrix.airflow-version != '1.10.15' && matrix.python-version == '3.10'
- name: Install Airflow with constraints
if: matrix.constraints == ''
run: |
wget https://raw.githubusercontent.com/apache/airflow/constraints-${{ matrix.airflow-version }}/constraints-3.9.txt -O constraints.txt
wget https://raw.githubusercontent.com/apache/airflow/constraints-${{ matrix.airflow-version }}/constraints-${{ matrix.python-version }}.txt -O constraints.txt
poetry run pip install apache-airflow==${{ matrix.airflow-version }} apache-airflow-providers-amazon -c constraints.txt
poetry run airflow db init

- name: Install Airflow 1.10.15
if: matrix.airflow-version == '1.10.15'
run: |
wget https://raw.githubusercontent.com/apache/airflow/constraints-1-10/constraints-3.8.txt -O constraints.txt
poetry run pip install "apache-airflow[amazon]==${{ matrix.airflow-version }}" -c constraints.txt
poetry run airflow initdb

- name: Run tests with pytest
run: poetry run pytest -v --cov=./airflow_dbt_python --cov-report=xml:./coverage.xml --cov-report term-missing tests/

Expand Down