Skip to content

Commit

Permalink
debug precommit failure
Browse files Browse the repository at this point in the history
  • Loading branch information
kurlov committed Oct 9, 2024
1 parent 5ee1836 commit 3ec503c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: "1.21"
- uses: pre-commit/[email protected]
- uses: pre-commit/[email protected]
name: Verify generated files are up-to-date
with:
extra_args: --hook-stage=manual --all-files
- name: run custom precommit
uses: ./custom-precommit.yml

verify-test:
name: "Verify & Test"
Expand Down
20 changes: 20 additions & 0 deletions custom-precommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: pre-commit
description: run pre-commit
inputs:
extra_args:
description: options to pass to pre-commit run
required: false
default: '--all-files'
runs:
using: composite
steps:
- run: python -m pip install pre-commit
shell: bash
- run: python -m pip freeze --local
shell: bash
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }}
shell: bash

0 comments on commit 3ec503c

Please sign in to comment.