Skip to content

Commit

Permalink
add github action to check pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lilioid committed Nov 15, 2023
1 parent b5161fc commit b615a18
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: lint
on:
push:
branches: [ "**" ]

jobs:
check-pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install -g pnpm
- run: python -m pip install pre-commit
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pre-commit run --show-diff-on-failure --color=always --all-files

0 comments on commit b615a18

Please sign in to comment.