Skip to content

Commit

Permalink
refactor: Use Poetry --directory PATH argument
Browse files Browse the repository at this point in the history
Avoids the need for a working directory.
  • Loading branch information
l0b0 committed Jan 18, 2023
1 parent 344a796 commit dd3a41c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ jobs:

- name: Get GDAL Python package version
run:
echo "GDAL_VERSION=$(poetry show gdal | tr -d ' ' | grep '^version:' |
cut -d ':' -f 2)" >> $GITHUB_ENV
working-directory: flooding/sentinel2_water_extraction
echo "GDAL_VERSION=$(poetry --directory
flooding/sentinel2_water_extraction show gdal | tr -d ' ' | grep
'^version:' | cut -d ':' -f 2)" >> $GITHUB_ENV

- name: Setup Conda
uses: s-weigand/[email protected]
Expand All @@ -118,14 +118,15 @@ jobs:
env.GDAL_VERSION }} poetry

- name: Install Python packages
run: poetry install --only=main --no-root
working-directory: flooding/sentinel2_water_extraction
run:
poetry --directory flooding/sentinel2_water_extraction install
--only=main --no-root

- name: Run test
run:
poetry run jupyter nbconvert --debug --execute --inplace --to=notebook
poetry --directory flooding/sentinel2_water_extraction run jupyter
nbconvert --debug --execute --inplace --to=notebook
sentinel2_water_extraction.ipynb
working-directory: flooding/sentinel2_water_extraction

finalise:
if: always()
Expand Down

0 comments on commit dd3a41c

Please sign in to comment.