mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
This GitHub Action will `run pre-commit` in any repo that contains a valid `.pre-commit-config.yaml` file. This Action will run on all push or pull_request actions to ensure that all pre-commit tests pass _before_ code review.
14 lines
437 B
YAML
14 lines
437 B
YAML
# https://pre-commit.com
|
|
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file.
|
|
name: pre-commit
|
|
on: [push, pull_request]
|
|
jobs:
|
|
pre-commit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions/setup-python@master
|
|
- run: pip install pre-commit
|
|
- run: pre-commit --version
|
|
- run: pre-commit install
|
|
- run: pre-commit run --all-files
|