-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.7 KB
/
check.yaml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install rye
uses: phi-friday/install-rye@v2
id: install-rye
with:
python_version: ${{ matrix.python-version }}
- name: prepare dependencies
id: prepare-dependencies
run: |
rye install uv
rye lock # init venv
rye build
- name: Load cached venv
id: cached-venv-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-test-${{ runner.os }}-${{ steps.install-rye.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}
- name: Install dependencies
if: steps.cached-venv-dependencies.outputs.cache-hit != 'true'
run: |
export UV_PYTHON=$(rye run python -c "import sys; print(sys.executable)")
uv pip compile pyproject.toml -o requirements.txt --extra test
uv pip install -r requirements.txt
- name: Install self
run: |
export UV_PYTHON=$(rye run python -c "import sys; print(sys.executable)")
uv pip install dist/airflow_serde_polars-0.0.0-py3-none-any.whl --reinstall-package airflow-serde-polars
- name: Test with pytest
run: |
source .venv/bin/activate
pytest -m "airflow or not airflow"