@@ -57,11 +57,16 @@ jobs:
57
57
working-directory : flooding/Sentinel2_Water_Extraction
58
58
59
59
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 }}
62
64
strategy :
63
65
fail-fast : false
64
66
matrix :
67
+ runner :
68
+ - macos-12
69
+ - ubuntu-22.04
65
70
python :
66
71
- " 3.8"
67
72
- " 3.9"
@@ -76,22 +81,32 @@ jobs:
76
81
with :
77
82
python-version : ${{ matrix.python }}
78
83
84
+ - name : Get pip cache directory
85
+ id : pip-cache
86
+ run : echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
87
+
79
88
- name : Cache pip
80
89
uses : actions/cache@v3.2.3
81
90
with :
82
- path : ~/.cache/ pip
91
+ path : ${{ steps. pip-cache.outputs.dir }}
83
92
key :
84
93
${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ matrix.python
85
94
}}-${{
86
95
hashFiles('./flooding/Sentinel2_Water_Extraction/poetry.lock') }}
87
96
restore-keys : |
88
97
${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ matrix.python }}-
89
98
90
- - name : Update package registry
99
+ - name : Update package registry on Linux
91
100
run : sudo apt-get update
101
+ if : startsWith(runner.os, 'Linux')
92
102
93
- - name : Install GDAL
103
+ - name : Install GDAL on Linux
94
104
run : sudo apt-get --assume-yes install libgdal-dev
105
+ if : startsWith(runner.os, 'Linux')
106
+
107
+ - name : Install GDAL on MacOS
108
+ run : brew install gdal
109
+ if : startsWith(runner.os, 'macOS')
95
110
96
111
- name : Upgrade pip
97
112
run : pip install --upgrade pip
0 commit comments