Skip to content

Update project configuration and python versions #106

Update project configuration and python versions

Update project configuration and python versions #106

Workflow file for this run

# This workflow will install the package, run tests, lint and build with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Test Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Test with Python ${{ matrix.python-version }} on Ubuntu
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
# https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-versioned-actions
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
# Consider specifying version (version: 1.7.1 on Python 3.11)
virtualenvs-create: true
virtualenvs-in-project: true #.venv in current directory
- name: Install dependencies
run: poetry install --no-root --without docs
- name: Lint with flake8
# Stop the build if there are Python syntax errors or undefined names. Exit-zero treats all errors as warnings.
run: python -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run unit tests
run: pytest
- name: Test installation
env:
QT_API: pyside6
run: |
poetry install --without docs
qats -h
qats app -h
qats config -h
python -m qats -h
- name: Test package build
run: poetry build
- name: Test documentation build
run: |
poetry install --with docs
sphinx-build -b html docs/source docs/_build