Skip to content

Commit

Permalink
Use poetry install in CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ezwelty committed Apr 17, 2024
1 parent dd664d7 commit 1827102
Showing 1 changed file with 11 additions and 31 deletions.
42 changes: 11 additions & 31 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,27 @@ jobs:
env:
coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' }}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ''
auto-activate-base: true
auto-update-conda: true
channels: conda-forge
- name: Check out repository
uses: actions/checkout@v2
- name: Install poetry
uses: snok/install-poetry@v1
- name: Export poetry requirements
shell: bash -l {0}
run: |
poetry export -o requirements.txt --without-hashes
poetry export -o constraints.txt --dev --without-hashes
- name: Create test conda environment
shell: bash -l {0}
run: |
conda create -n test -y python=${{ matrix.python-version }}
- name: Install lint dependencies
- name: Install conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-name: test
create-args: >-
python=${{ matrix.python-version }}
gdal=3.2.0
- name: Install dependencies
shell: bash -l {0}
run: |
conda activate test
pip install --constraint=constraints.txt flake8 flake8-annotations flake8-black flake8-docstrings flake8-isort
poetry install --no-interaction --all-extras
- name: Lint
shell: bash -l {0}
run: |
conda activate test
flake8 src tests
- name: Install test dependencies
shell: bash -l {0}
run: |
conda activate test
conda install -y gdal=3.2.0
pip install --constraint=constraints.txt -r requirements.txt
pip install --constraint=constraints.txt pytest
- name: Install coverage dependencies
if: env.coverage == 'true'
shell: bash -l {0}
run: |
conda activate test
pip install --constraint=constraints.txt pytest-cov coverage[toml] codecov
- name: Test
if: env.coverage == 'false'
shell: bash -l {0}
Expand Down

0 comments on commit 1827102

Please sign in to comment.