-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (39 loc) · 1.09 KB
/
Copy pathformat-and-lint.yml
File metadata and controls
46 lines (39 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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