-
Notifications
You must be signed in to change notification settings - Fork 40
51 lines (38 loc) · 1.11 KB
/
check-formatting.yaml
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
47
48
49
50
51
name: Check Code Formatting
on:
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
format-python:
name: Python Formatting & Linting
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run:
python -m pip install --upgrade pip
pip install "click==8.0.4" black isort pylint
- name: Checkout code
uses: actions/checkout@v3
- name: Run black formatter
run: black --check --verbose .
- name: Run isort formatter
run: isort --check --diff .
- name: Run pylint
run: pylint frontend
format-cpp:
name: C++ Formatting
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get -y install clang-format-14 python3
- name: Checkout code
uses: actions/checkout@v3
- name: Run clang-format
run: python3 ./bin/format.py --check --verbose --cfversion 14 .