Add the continuous integration workflow
Installs the project, then runs ruff, mypy, pytest and the Doxygen build. No step opens a turtle window. GitHub Actions and Gitea Actions both read this folder. Task: MIL-001#5
This commit is contained in:
@@ -0,0 +1,44 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
# Read by GitHub Actions and by Gitea Actions. No step opens a turtle window:
|
||||||
|
# the tests use a recording fake pen.
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
checks:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out the repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python 3.13
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.13"
|
||||||
|
|
||||||
|
- name: Install Doxygen
|
||||||
|
run: sudo apt-get update && sudo apt-get install --yes doxygen
|
||||||
|
|
||||||
|
- name: Install the project and its development tools
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install -e ".[dev]"
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: ruff check .
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: ruff format --check .
|
||||||
|
|
||||||
|
- name: Check types
|
||||||
|
run: mypy
|
||||||
|
|
||||||
|
- name: Run the tests
|
||||||
|
run: python -m pytest
|
||||||
|
|
||||||
|
- name: Build the source documentation
|
||||||
|
run: doxygen Doxyfile
|
||||||
Reference in New Issue
Block a user