Skip to content

Commit b7df8d7

Browse files
committed
[github] Add lint check workflow
1 parent 61554e6 commit b7df8d7

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/lint.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint check
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint-clang-format:
7+
name: Lint with clang-format
8+
runs-on: ubuntu-latest
9+
if: ${{ false }} # disable for now
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
- name: Check code with clang-format
14+
uses: jidicula/[email protected]
15+
with:
16+
clang-format-version: "14"
17+
lint-black:
18+
name: Lint with black
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
- name: Set up Python
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: "3.9"
27+
- name: Install test dependencies
28+
uses: BSFishy/pip-action@v1
29+
with:
30+
packages: |
31+
black
32+
isort
33+
- name: Check code with black
34+
run: black --check .
35+
- name: Check code with isort
36+
run: isort --profile black . --check-only

0 commit comments

Comments
 (0)