Merge remote-tracking branch 'origin/master' #5
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: Code formatter and linter | |
on: | |
push: | |
branches: [ master ] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: Ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install | |
- name: Format with isort and black | |
run: | | |
poetry run isort . | |
poetry run black . | |
- name: Linting with ruff | |
run: | | |
poetry run ruff . | |
- name: Type checking with mypy | |
run: | | |
poetry run mypy . | |
- name: Install clang-format | |
run: | | |
sudo apt-get install clang-format | |
- name: Format with clang-format | |
run: | | |
find . -iname *.cpp -o -iname *.hpp -o -iname *.c -o -iname *.h | xargs clang-format -i -style=file | |
- name: Build docs | |
run: | | |
poetry run mkdocs gh-deploy --force |