-
Notifications
You must be signed in to change notification settings - Fork 48
63 lines (54 loc) · 1.99 KB
/
Copy pathpython-app.yml
File metadata and controls
63 lines (54 loc) · 1.99 KB
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
63
name: Python application
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install flake8
run: python -m pip install --upgrade pip flake8
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
test:
runs-on: ubuntu-latest
name: test (py${{ matrix.python-version }}, pandas ${{ matrix.pandas }})
strategy:
fail-fast: false
matrix:
include:
# Python version coverage, on the latest dependencies.
- { python-version: "3.10", pandas: latest, pin: "" }
- { python-version: "3.11", pandas: latest, pin: "" }
- { python-version: "3.12", pandas: latest, pin: "" }
- { python-version: "3.13", pandas: latest, pin: "" }
# pandas version coverage, on a stable Python.
- { python-version: "3.11", pandas: "2.0.3", pin: "pandas==2.0.3 numpy==1.26.4" }
- { python-version: "3.11", pandas: "2.1.4", pin: "pandas==2.1.4 numpy==1.26.4" }
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Pin dependency versions
if: matrix.pin != ''
run: python -m pip install ${{ matrix.pin }}
- name: Install package and test tools
# polars requires Python 3.10+; pyarrow powers the polars <-> pandas bridge.
run: python -m pip install -e . pytest polars pyarrow
- name: Test with pytest
run: pytest -q