Skip to content

Commit

Permalink
test: Poetry on Windows
Browse files Browse the repository at this point in the history
Conda is installed on the runner by default, but we need to do
additional setup
<actions/runner-images#3477 (comment)>
to make it available on the command line.
  • Loading branch information
l0b0 committed Jan 17, 2023
1 parent a7bace8 commit f8ccffd
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
runner:
- macos-12
- ubuntu-22.04
- windows-2022
python:
- "3.8"
- "3.9"
Expand All @@ -77,11 +78,14 @@ 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

- name: Use Python ${{ matrix.python }}
id: setup-python
uses: actions/setup-python@v4.5.0
with:
python-version: ${{ matrix.python }}
Expand All @@ -97,23 +101,14 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-${{ secrets.CACHE_SEED }}-${{ matrix.python }}-
- name: Update package registry on Linux
run: sudo apt-get update
if: startsWith(runner.os, 'Linux')

- name: Install GDAL on Linux
run: sudo apt-get --assume-yes install libgdal-dev
if: startsWith(runner.os, 'Linux')

- name: Install GDAL on MacOS
run: brew install gdal
if: startsWith(runner.os, 'macOS')

- name: Upgrade pip
run: pip install --upgrade pip
- name: Setup Conda
uses: s-weigand/setup-conda@v1.1.1
with:
conda-channels: conda-forge
python-version: ${{ steps.setup-python.outputs.python-version }}

- name: Install Poetry
run: pip install poetry
- name: Install Conda environment packages
run: conda install --channel=conda-forge --quiet --yes gdal poetry

- name: Install Python packages
run: poetry install --only=main --no-root
Expand Down

0 comments on commit f8ccffd

Please sign in to comment.