Skip to content

Commit

Permalink
Add Python linter to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lshamis committed Jul 29, 2023
1 parent a69ae38 commit 59e126c
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:

jobs:
cpp_lint:
name: Format and lint
name: C++ format and lint
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -33,3 +33,22 @@ jobs:
- name: Fail if lint failed
if: steps.linter.outputs.checks-failed > 0
run: exit 1
py_lint:
name: Python format and lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black
- name: Run Black
run: |
black . --check --exclude tools/splat/ --exclude tools/splat_ext/ --exclude diff.py

0 comments on commit 59e126c

Please sign in to comment.