Skip to content

python 3.10 -> 3.14 support & update CI actions components #351

python 3.10 -> 3.14 support & update CI actions components

python 3.10 -> 3.14 support & update CI actions components #351

name: pynsee package tests
on:
pull_request_target:
branches:
- 'master'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.14"]
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
# additional tests
pip install jupytext nbconvert matplotlib descartes
- 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 .[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