Skip to content

Commit a8dde14

Browse files
authored
Update ci.yml
Uses matrix testing (3.10–3.12) Installs with pip (no Poetry) Installs dev dependencies Runs lint Runs tests with coverage Verifies package builds
1 parent a151216 commit a8dde14

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,50 @@
1-
name: planet_overlap CI
1+
name: CI
22

33
on:
44
push:
5-
branches: [ main, develop ]
65
pull_request:
7-
branches: [ main ]
86

97
jobs:
108
build-and-test:
119
runs-on: ubuntu-latest
1210

11+
strategy:
12+
matrix:
13+
python-version: ["3.10", "3.11", "3.12"]
14+
1315
steps:
14-
# 1️⃣ Checkout repository
1516
- name: Checkout repository
16-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1718

18-
# 2️⃣ Setup Python 3.10
1919
- name: Set up Python
20-
uses: actions/setup-python@v4
20+
uses: actions/setup-python@v5
2121
with:
22-
python-version: "3.10"
22+
python-version: ${{ matrix.python-version }}
2323

24-
# 3️⃣ Install Poetry
25-
- name: Install Poetry
26-
run: |
27-
curl -sSL https://install.python-poetry.org | python3 -
28-
echo "$HOME/.local/bin" >> $GITHUB_PATH
29-
poetry --version
24+
- name: Upgrade pip
25+
run: python -m pip install --upgrade pip
3026

31-
# 4️⃣ Install dependencies (including package)
32-
- name: Install dependencies
33-
run: |
34-
poetry install
27+
- name: Install package + dev dependencies
28+
run: pip install -e .[dev]
3529

36-
# 5️⃣ Run linting
37-
- name: Run linting
38-
run: |
39-
poetry run flake8 . --max-line-length=100
30+
- name: Lint (flake8)
31+
run: flake8 src tests
32+
33+
- name: Check formatting (black)
34+
run: black --check .
35+
36+
- name: Type check (mypy)
37+
run: mypy src
38+
39+
- name: Run tests with coverage
40+
run: pytest --cov=planet_overlap --cov-report=term-missing
4041

41-
# 6️⃣ Run tests
42-
- name: Run tests
42+
- name: Build distribution
4343
run: |
44-
poetry run pytest tests --maxfail=1 --disable-warnings -q
44+
pip install build
45+
python -m build
4546
46-
# 7️⃣ Check memory usage for key test
47-
- name: Memory profiling
47+
- name: Verify wheel installs
4848
run: |
49-
poetry run python -m memory_profiler tests/test_analysis.py
49+
pip install dist/*.whl
50+
python -c "import planet_overlap"

0 commit comments

Comments
 (0)