Skip to content

Commit 2b96366

Browse files
authored
Update ci.yml
using Python 3.10 (to avoid the GeoPandas dependency resolution issues) and includes installing dev tools, running tests, and linting:
1 parent 45fbf0d commit 2b96366

File tree

1 file changed

+40
-13
lines changed

1 file changed

+40
-13
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,53 @@
1-
name: CI
1+
name: planet_overlap CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, develop ]
66
pull_request:
77
branches: [ main ]
88

99
jobs:
10-
test:
10+
build-and-test:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-python@v4
16-
with:
17-
python-version: 3.11
14+
# Step 1: Checkout the repo
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
# Step 2: Set up Python
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.10'
23+
24+
# Step 3: Install Poetry
25+
- name: Install Poetry
26+
run: |
27+
curl -sSL https://install.python-poetry.org | python3 -
28+
export PATH="$HOME/.local/bin:$PATH"
29+
poetry --version
30+
31+
# Step 4: Install dependencies
32+
- name: Install dependencies
33+
run: |
34+
export PATH="$HOME/.local/bin:$PATH"
35+
poetry install --no-root
1836
19-
- name: Install Poetry
20-
run: curl -sSL https://install.python-poetry.org | python3 -
37+
# Step 5: Run unit tests
38+
- name: Run tests
39+
run: |
40+
export PATH="$HOME/.local/bin:$PATH"
41+
poetry run pytest planet_overlap/tests --maxfail=1 --disable-warnings -q
2142
22-
- name: Install dependencies
23-
run: poetry install
43+
# Step 6: Lint check
44+
- name: Lint code
45+
run: |
46+
export PATH="$HOME/.local/bin:$PATH"
47+
poetry run flake8 planet_overlap --max-line-length=100
2448
25-
- name: Run tests
26-
run: poetry run pytest --cov=planet_overlap --cov-report=xml
49+
# Step 7: Optional: Memory profiler test (if included in dev dependencies)
50+
- name: Memory profiling (optional)
51+
run: |
52+
export PATH="$HOME/.local/bin:$PATH"
53+
poetry run python -m memory_profiler

0 commit comments

Comments
 (0)