Skip to content

try to test using pypy-3.10 #91

try to test using pypy-3.10

try to test using pypy-3.10 #91

Workflow file for this run

name: Python package
on: [push, pull_request]
env:
PY_COLORS: "1"
jobs:
codegen:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ "ubuntu-latest", "windows-latest", "macos-latest" ]
python-version: ["3.9", "3.13"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
run: |
tox -e codegen
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ "ubuntu-latest", "windows-latest", "macos-latest" ]
python-version: ["3.9", "3.13", "pypy-3.10"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
run: |
tox -e gh
- name: Coveralls
if: matrix.os == 'ubuntu-latest'
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Test ${{ matrix.os }} ${{ matrix.python-version }}
coveralls_finish:
needs: [test, codegen]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy ruff
pip install -e .[plot]
- name: Static type checking with mypy
run: |
mypy --python-version 3.9 .
mypy --python-version 3.10 .
mypy --python-version 3.11 .
mypy --python-version 3.12 .
mypy --python-version 3.13 .
- name: Run linters
run: |
ruff check ./src
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
pip install -e .
- name: Build documentation
run: |
python -m sphinx -Ean docs build
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build wheel and sdist
run: python -m build
- name: Check build artifacts
run: twine check --strict dist/*
release:
needs: [test, codegen, linter, build]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch tags for setuptools-scm
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build a binary wheel and a source tarball
run: |
python -m build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
password: ${{ secrets.pypi_password }}