Skip to content

Add CI configuration to test on Python 3.11 #44

Add CI configuration to test on Python 3.11

Add CI configuration to test on Python 3.11 #44

Workflow file for this run

name: Test
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-latest
name: Test (${{ matrix.python-version }})
strategy:
matrix:
python-version:
#- 2.7
#- 3.5
#- 3.6
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
#- pypy-2.7
#- pypy-3.6
#- pypy-3.7
steps:
- name: Checkout SSH docker container
run: docker pull sjourdan/alpine-sshd
- name: Checkout code
uses: actions/checkout@v1
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install test dependencies
run: python -m pip install -U -r tests/requirements.txt
- name: Install local code
run: python -m pip install .
- name: Test with coverage
run: python -m coverage run -m unittest discover -vv
- name: Report coverage
run: python -m coverage report
- name: Export coverage statistics
run: python -m coverage xml
- name: Upload coverage statistics to Codecov
run: python -m codecov
package:
environment: PyPI
runs-on: ubuntu-latest
name: Deploy (PyPI)
needs: test
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install build package
run: python -m pip install -U build
- name: Build a wheel and source tarball
run: python -m build --sdist --wheel --outdir dist
- name: Publish distributions to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}