use pyproject.toml #215
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
name: Pytest | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9, '3.10', 3.11, 3.12] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install gdal-bin libproj-dev libgdal-dev proj-bin | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install -r <(python -c 'import toml; print("\n".join(toml.load("pyproject.toml")["project"]["dependencies"]))') | |
- name: Test with pytest | |
run: | | |
poetry run pytest --cov-report=xml --cov=. | |
- name: "Upload Report to Codecov" | |
uses: codecov/[email protected] | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
file: ./coverage.xml | |
fail_ci_if_error: true |