Skip to content

Commit

Permalink
Add style check GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vinhowe committed May 23, 2023
1 parent addd82c commit bebcdc5
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Based on https://github.com/psf/black/actions/runs/17913292/workflow

name: Style check
on:
push:
paths:
- '**.py'
pull_request:
paths:
- '**.py'
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Black
run: pip install black
- name: Run black check
run: black --check .
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install isort
run: pip install isort
- name: Run isort check
run: isort --check-only .

0 comments on commit bebcdc5

Please sign in to comment.