Add tests for Python3.12 #180
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: CI | |
on: [push] | |
jobs: | |
linting: | |
name: Linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
name: "Checkout branch" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: "Linting test" | |
run: | | |
pip install flake8 | |
- name: "Linting test" | |
run: | | |
flake8 src | |
test: | |
name: Tests | |
# This job runs on Linux | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
# Note: We need to quote '3.10' and '3.11' otherwise it's interpreted as as number, e.g. 3.1 | |
python-version: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v1 | |
name: "Checkout branch" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: | | |
# We need to install numpy by hand, to prevent manual compilation on py3.5 which fails... | |
pip install numpy | |
pip install .[plot] pytest | |
sudo apt-get update --yes && sudo apt-get install graphviz | |
name: "Install dependencies" | |
- run: | | |
cd tests && MATPLOTLIBRC="../ci" pytest ./ | |
name: "Run the tests" | |
publish: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
name: Publish the package to PyPI | |
environment: | |
name: pypi | |
url: https://pypi.org/p/ikpy | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
# Pip doesn't support building a sdist when in PEP517 mode, so use a dedicated package for this | |
- run: pip install build && python -m build --sdist --wheel | |
- uses: pypa/gh-action-pypi-publish@release/v1 |