Use pure pyproject.toml instead of setup.py for packaging, including automatic versioning #8
Workflow file for this run
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 | |
# by not building all branches on push, we avoid the duplicated builds in PRs | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '**' | |
pull_request: | |
env: | |
NUMBA_NUM_THREADS: 1 | |
MPLBACKEND: Agg | |
PYTEST_ADDOPTS: --color=yes | |
jobs: | |
static-code-checks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
tests: | |
strategy: | |
matrix: | |
include: | |
- python-version: "3.10" | |
os: ubuntu-latest | |
- python-version: "3.11" | |
os: ubuntu-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Build the package | |
run: | | |
pip install build | |
python -m build | |
- name: Install the package | |
run: pip install .[test] | |
- name: Install the package in editable mode with all additional dependencies | |
run: pip install --editable .[all] | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Update pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install doc dependencies | |
run: | | |
pip install -e .[doc] | |
python -c 'import iop4lib; print(iop4lib.__version__)' | |
- name: Build docs | |
run: cd docs && make html |