From bebcdc5ed6f3b2ad68957bb365b596821d39599d Mon Sep 17 00:00:00 2001 From: Vin Howe <24789592+vinhowe@users.noreply.github.com> Date: Mon, 22 May 2023 13:18:57 -0600 Subject: [PATCH] Add style check GitHub workflow --- .github/workflows/style-check.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/style-check.yml 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 .