Skip to content

Commit a7bace8

Browse files
committed
test: Poetry on MacOS
1 parent 49b9dfc commit a7bace8

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

.github/workflows/test.yml

+21-5
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,26 @@ jobs:
5757
working-directory: flooding/Sentinel2_Water_Extraction
5858

5959
test-poetry:
60-
name: Test using Poetry on Python ${{ matrix.python }}
61-
runs-on: ubuntu-22.04
60+
name:
61+
Test on ${{ matrix.runner }}, using Poetry with Python ${{ matrix.python
62+
}}
63+
runs-on: ${{ matrix.runner }}
6264
strategy:
6365
fail-fast: false
6466
matrix:
67+
runner:
68+
- macos-12
69+
- ubuntu-22.04
6570
python:
6671
- "3.8"
6772
- "3.9"
6873
- "3.10"
6974
- "3.11"
75+
include:
76+
- runner: macos-12
77+
pip-cache-dir: ~/Library/Caches/pip
78+
- runner: ubuntu-22.04
79+
pip-cache-dir: ~/.cache/pip
7080
steps:
7181
- name: Check out repository
7282
uses: actions/checkout@v3.3.0
@@ -79,19 +89,25 @@ jobs:
7989
- name: Cache pip
8090
uses: actions/cache@v3.2.3
8191
with:
82-
path: ~/.cache/pip
92+
path: ${{ matrix.pip-cache-dir }}
8393
key:
8494
${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ matrix.python
8595
}}-${{
8696
hashFiles('./flooding/Sentinel2_Water_Extraction/poetry.lock') }}
8797
restore-keys: |
8898
${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ matrix.python }}-
8999
90-
- name: Update package registry
100+
- name: Update package registry on Linux
91101
run: sudo apt-get update
102+
if: startsWith(runner.os, 'Linux')
92103

93-
- name: Install GDAL
104+
- name: Install GDAL on Linux
94105
run: sudo apt-get --assume-yes install libgdal-dev
106+
if: startsWith(runner.os, 'Linux')
107+
108+
- name: Install GDAL on MacOS
109+
run: brew install gdal
110+
if: startsWith(runner.os, 'macOS')
95111

96112
- name: Upgrade pip
97113
run: pip install --upgrade pip

flooding/Sentinel2_Water_Extraction/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Below are the instructions to get the Notebook up and running
77

88
## Prerequisites
99

10+
- Linux (tested on Ubuntu 22.04) or macOS (tested on version 12, Monterey)
1011
- Python 3.8, 3.9, 3.10, or 3.11
1112
- GDAL 3.4
1213

0 commit comments

Comments
 (0)