Skip to content

Readthedocs.

Readthedocs. #43

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
test-python:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8, '3.10']
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test
run: |
python setup.py build_ext -b .
python -m unittest
test-c:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test
run: |
make test-c
release:
needs: [test-python, test-c]
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Install pypa/build
run: |
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: |
git clean -dfx
python -m build --sdist --outdir dist/ .
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
password: ${{ secrets.pypi_password }}