fix: airflow constraint #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: [dev] | |
paths: | |
- "**.py" | |
- ".github/workflows/check.yaml" | |
- "pyproject.toml" | |
pull_request: | |
branches: [dev, main] | |
paths: | |
- "**.py" | |
- ".github/workflows/check.yaml" | |
- "pyproject.toml" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
UV_CACHE_DIR: /tmp/.uv-cache | |
UV_CONSTRAINT: "https://raw.githubusercontent.com/apache/airflow/constraints-${{ matrix.airflow-version }}/constraints-${{ matrix.python-version }}.txt" | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
airflow-version: ["2.8.4", "2.9.3", "2.10.0"] | |
name: check py-${{ matrix.python-version }} airflow-${{ matrix.airflow-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Set up Python ${{ matrix.python-version }} | |
id: setup-python | |
run: | | |
uv python install ${{ matrix.python-version }} | |
uv python pin ${{ matrix.python-version }} | |
uv lock | |
uv venv | |
- name: Install dependencies | |
run: | | |
uv pip compile pyproject.toml -o requirements.txt --extra test | |
uv pip install -r requirements.txt "apache-airflow==${{ matrix.airflow-version }}" | |
- name: Install self | |
run: | | |
uvx --from build pyproject-build --installer uv | |
uv pip install dist/airflow_serde_polars-0.0.0-py3-none-any.whl --reinstall-package airflow-serde-polars --no-deps | |
- name: Test with pytest | |
run: | | |
source .venv/bin/activate | |
pytest -m "airflow or not airflow" | |