Skip to content

Modernise Build System #354

Modernise Build System

Modernise Build System #354

Workflow file for this run

name: Build and test
on:
pull_request:
branches:
- main
- develop
workflow_dispatch:
jobs:
macos:
name: Build and test (MacOS)
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build qermit
if: github.event_name == 'pull_request'
run: |
pip install -e .[tests] -v
- name: Test qermit
if: github.event_name == 'pull_request'
run: |
cd tests
pytest --cov-report term-missing:skip-covered --cov=qermit --durations=10
linux:
name: Build and test (Linux)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build qermit
if: github.event_name == 'pull_request'
run: |
pip install -e .[tests] -v
- name: Test qermit
if: github.event_name == 'pull_request'
run: |
cd tests
pytest --cov-report term-missing:skip-covered --cov=qermit --durations=10
windows:
name: Build and test (Windows)
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build qermit
if: github.event_name == 'pull_request'
run: |
pip install -e .[tests] -v
- name: Test qermit
if: github.event_name == 'pull_request'
run: |
cd tests
pytest --cov-report term-missing:skip-covered --cov=qermit --durations=10
build-docs:
name: Test documentation build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Qermit
run: pip install -e .[docs] -v
- name: Build Docs
run: |
cd docs_src
./build_docs.sh
cd ../manual
./build_manual.sh
- name: Save documentation
uses: actions/upload-artifact@v2
with:
name: docs_html
path: docs/
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'docs/'
formatting-checks:
name: Check typing and formatting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build qermit
run: |
pip install .[tests]
cd tests
- name: Run mypy
if: github.event_name == 'pull_request'
run: mypy -p qermit
- name: Format check
if: github.event_name == 'pull_request'
run: flake8 qermit/ tests/ --ignore=E501,W503