Skip to content

Commit

Permalink
F2calv/2024 06 add pre-commit wf (#39)
Browse files Browse the repository at this point in the history
* add new wf

* tweaks

* try this
  • Loading branch information
f2calv authored Jun 9, 2024
1 parent ddbb746 commit 4bc7846
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: lint

on:
workflow_call:
inputs:
pre-commit-version:
description: Set pre-commit version.
type: string
default: 3.7.1

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

#https://pre-commit.com/
- name: pre-commit
run: |
echo "pre-commit setup..."
#sudo apt-get update && sudo apt-get install -y python3 pip pre-commit
python3 -m pip install 'pre-commit~=${{ inputs.pre-commit-version }}' -q
echo "git setup..."
git init
git add *
echo "pre-commit execute..."
#python3 -m pre_commit autoupdate
#python3 -m pre_commit install --install-hooks
python3 -m pre_commit run --all-files --verbose

0 comments on commit 4bc7846

Please sign in to comment.