-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Works around flaky temporary directory removal on Windows <python-poetry/poetry-core#460>.
- Loading branch information
Showing
2 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
|
@@ -104,6 +107,7 @@ jobs: | |
run: | ||
echo "GDAL_VERSION=$(poetry show gdal | tr -d ' ' | grep '^version:' | | ||
cut -d ':' -f 2)" >> $GITHUB_ENV | ||
shell: bash | ||
working-directory: flooding/sentinel2_water_extraction | ||
|
||
- name: Setup Conda | ||
|
@@ -117,9 +121,22 @@ 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 install --only=main --no-root | ||
working-directory: flooding/sentinel2_water_extraction | ||
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/[email protected] | ||
with: | ||
timeout_minutes: 9999 # Work around https://github.com/nick-fields/retry/issues/107 | ||
max_attempts: 6 | ||
command: cd flooding/sentinel2_water_extraction && poetry install | ||
--only=main --no-root # https://github.com/python-poetry/poetry/issues/7363, https://github.com/nick-fields/retry/issues/89 | ||
shell: bash | ||
if: ${{ startsWith(runner.os, 'Windows') }} | ||
|
||
- name: Run test | ||
run: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters