chore: maximize setuptools version (#302) #395
This file contains hidden or 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: pynsee package tests | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 black pytest pytest-xdist pytest-cov geopandas nbconvert matplotlib descartes parameterized | |
| - name: Lint with flake8 | |
| run: | | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 . --config .flake8 | |
| - name: Lint with black | |
| run: | | |
| black . --config pyproject.toml | |
| - name: Test examples | |
| env: | |
| sirene_key: ${{ secrets.SIRENE_KEY }} | |
| run: | | |
| pip install jupytext | |
| pip install .[full] | |
| # test all notebooks | |
| cd docs/examples | |
| jupytext --to py *.md | |
| # run all py files | |
| # for f in *.py; do python "$f"; done | |
| cd ../.. | |
| - name: Test with pytest and xdist | |
| env: | |
| sirene_key: ${{ secrets.SIRENE_KEY }} | |
| run: | | |
| pytest -v --cov --cov-report=xml -n auto | |
| - name: "Upload coverage to Codecov" | |
| uses: codecov/codecov-action@v5 | |
| if: github.ref == 'refs/heads/master' | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true |