change package manager to poetry #221
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
# poetry and pytest execution inspired by | |
# https://github.com/okeeffed/hello-pytest-github-actions/ | |
name: Ubuntu | |
on: | |
push: | |
branches: [develop] | |
pull_request: | |
branches: [develop] | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Install build tools | |
run: sudo apt-get update && sudo apt-get install cmake ninja-build | |
- name: Install latest release of llvm (includes clang) | |
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 14 all && sudo ln -s /usr/bin/llvm-nm-14 /usr/bin/llvm-nm && sudo apt list --installed | grep llvm | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Install graphviz, plantuml and umlet | |
run: | | |
sudo apt-get -y install plantuml | |
which plantuml | |
sudo apt-get -y install graphviz | |
set GRAPHVIZ_DOT=$(which dot) | |
sudo apt-get -y install umlet | |
which umlet | |
# Setup Python (faster than using Python container) | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install poetry | |
run: | | |
python -m pip install --upgrade poetry | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Run test suite | |
run: | | |
poetry run python -m pytest --verbose --capture=tee-sys | |
- name: Build package | |
run: | | |
poetry build | |
- name: Create documentation | |
run: | | |
poetry run make --directory doc html | |
- name: Publish documentation | |
if: github.ref == 'refs/heads/develop' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: doc/build/html # The folder the action should deploy. |