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