diff --git a/.github/workflows/style-check.yml b/.github/workflows/style-check.yml new file mode 100644 index 0000000..7eabafd --- /dev/null +++ b/.github/workflows/style-check.yml @@ -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 .