From ecd118a4687a65bb37b942c610d4d04f8558ff14 Mon Sep 17 00:00:00 2001 From: Kara Engelhardt Date: Mon, 18 Dec 2023 18:33:16 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Lint=20using=20pre-commit=20in?= =?UTF-8?q?=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc8523ad2..8469660e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,20 +15,15 @@ jobs: with: node-version: '16' cache: 'yarn' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install black==23.9.1 isort==5.12.0 flake8==6.1.0 flake8-bugbear==23.9.16 - yarn install - - name: Run flake8 - run: flake8 fragdenstaat_de --statistics - - name: Run black - run: black --check fragdenstaat_de - - name: Run isort - run: isort --check fragdenstaat_de - - name: Run eslint - run: yarn lint + - name: cache pre-commit env + uses: actions/cache@v3 + with: + path: ~/.cache/pre-commit + key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.pre-commit-config.yaml') }} + + - name: run pre-commit + run: pre-commit run --show-diff-on-failure --color=always --all-files test: runs-on: ubuntu-latest