From cb9757d0ff6a1fa5c4fee0de68a92d0411cda358 Mon Sep 17 00:00:00 2001 From: Josselin Feist Date: Wed, 2 Oct 2024 11:33:45 +0200 Subject: [PATCH] Create black_auto --- .github/workflows/black_auto | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/black_auto diff --git a/.github/workflows/black_auto b/.github/workflows/black_auto new file mode 100644 index 000000000..4c0dca0c6 --- /dev/null +++ b/.github/workflows/black_auto @@ -0,0 +1,41 @@ +--- +name: Run black (auto) + +defaults: + run: + # To load bashrc + shell: bash -ieo pipefail {0} + +on: + pull_request: + branches: [master, dev] + paths: + - "**/*.py" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Black + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Set up Python 3.8 + uses: actions/setup-python@v5 + with: + python-version: 3.8 + + - name: Install Python dependencies + run: pip install .[dev] + + - name: Run linters + uses: wearerequired/lint-action@v2 + with: + auto_fix: true + black: true + black_auto_fix: true