Skip to content

jobiols is running pre-commit #87

jobiols is running pre-commit

jobiols is running pre-commit #87

Workflow file for this run

name: pre-commit
run-name: ${{ github.actor }} is running pre-commit
on:
push:
branches:
- "main"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Hacer checkout del repositorio
- uses: actions/setup-python@v4
name: Instalar Python
with:
python-version: '3.8'
- uses: actions/cache@v3
name: Preparar cache para reducir tiempo de ejecución
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit on all files
run: pre-commit run --all-files --show-diff-on-failure --color=always
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
if [ "$newfiles" != "" ] ; then
echo "Please check-in the following files:"
echo "$newfiles"
exit 1
fi