Skip to content

py-versions should be strings in yml file #328

py-versions should be strings in yml file

py-versions should be strings in yml file #328

Workflow file for this run

name: pynsee package tests
on:
push:
branches:
- 'parallel_tests'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
group: [1, 2, 3, 4, 5, 6, 7]
python-version: ["3.10", "3.11", "3.12"] # Python versions
exclude:
- group: 1
python-version: "3.11"
- group: 1
python-version: "3.12"
- group: 2
python-version: "3.11"
- group: 2
python-version: "3.12"
- group: 3
python-version: "3.10"
- group: 3
python-version: "3.12"
- group: 4
python-version: "3.10"
- group: 4
python-version: "3.12"
- group: 5
python-version: "3.10"
- group: 5
python-version: "3.11"
- group: 6
python-version: "3.10"
- group: 6
python-version: "3.11"
- group: 7
python-version: "3.10"
- group: 7
python-version: "3.11"
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov pytest-xdist geopandas nbconvert matplotlib descartes parameterized
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-extra.txt ]; then pip install -r requirements-extra.txt; fi
pip install .[full]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --ignore=E722,C901 --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test examples
env:
sirene_key: ${{ secrets.SIRENE_KEY }}
run: |
pip install jupytext
# 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
env:
sirene_key: ${{ secrets.SIRENE_KEY }}
TEST_GROUP: ${{ matrix.group }}
run: |
python split_tests.py --group $TEST_GROUP --total-groups 7
pytest -v --cov $(cat test_files.txt) -n auto