diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6fe2247e..f1965ade 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,6 +67,7 @@ jobs: runner: - macos-12 - ubuntu-22.04 + - windows-2022 python: - "3.8" - "3.9" @@ -76,6 +77,8 @@ jobs: pip-cache-dir: ~/Library/Caches/pip - runner: ubuntu-22.04 pip-cache-dir: ~/.cache/pip + - runner: windows-2022 + pip-cache-dir: ~\AppData\Local\pip\Cache steps: - name: Check out repository uses: actions/checkout@v3.3.0 @@ -102,9 +105,10 @@ jobs: - name: Get GDAL Python package version run: - echo "GDAL_VERSION=$(poetry --directory - flooding/sentinel2_water_extraction show gdal | tr -d ' ' | grep - '^version:' | cut -d ':' -f 2)" >> $GITHUB_ENV + echo "GDAL_VERSION=$(poetry + --directory flooding/sentinel2_water_extraction show gdal | tr -d ' ' + | grep '^version:' | cut -d ':' -f 2)" >> $GITHUB_ENV + shell: bash - name: Setup Conda uses: s-weigand/setup-conda@v1.1.1 @@ -117,10 +121,24 @@ jobs: conda install --channel=conda-forge --quiet --yes gdal=${{ env.GDAL_VERSION }} poetry - - name: Install Python packages + - name: Install Python packages on non-Windows runner run: poetry --directory flooding/sentinel2_water_extraction install --only=main --no-root + if: ${{ !startsWith(runner.os, 'Windows') }} + + - name: + Install Python packages on Windows runner (remove after + https://github.com/python-poetry/poetry-core/pull/460 is released) + uses: nick-fields/retry@v2.8.3 + with: + timeout_minutes: 9999 # Work around https://github.com/nick-fields/retry/issues/107 + max_attempts: 6 + command: + poetry --directory=flooding/sentinel2_water_extraction install + --only=main --no-root + shell: bash + if: ${{ startsWith(runner.os, 'Windows') }} - name: Run test run: diff --git a/flooding/sentinel2_water_extraction/README.md b/flooding/sentinel2_water_extraction/README.md index 5ace7d75..fecde97d 100644 --- a/flooding/sentinel2_water_extraction/README.md +++ b/flooding/sentinel2_water_extraction/README.md @@ -7,7 +7,8 @@ Below are the instructions to get the Notebook up and running ## Prerequisites -- Linux (tested on Ubuntu 22.04) or macOS (tested on version 12, Monterey) +- Linux (tested on Ubuntu 22.04), macOS (tested on version 12, Monterey), or + Windows (tested on Windows Server 2022) - Python 3.8, 3.9, or 3.10 - GDAL 3.4