Workflow file for this run
This file contains hidden or 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: Check the unit-tests, build-package and build-sphinx-docs | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
unittests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install Opticomlib | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[opticomlib] | |
- name: Run Unit Tests | |
run: | | |
pip install pytest | |
pytest -v | |
package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install Opticomlib | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[opticomlib] | |
- name: Build Package | |
run: | | |
pip install build | |
python -m build | |
- name: Check Package | |
run: | | |
pip install twine | |
twine check dist/* | |
sphinx-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install Opticomlib | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[opticomlib] | |
- name: Install Sphinx | |
run: | | |
pip install sphinx==6.2.1 | |
pip install renku-sphinx-theme | |
pip install sphinx-copybutton | |
- name: Build docs | |
working-directory: docs | |
run: make html |