pre-commit/.github/workflows/pre-commit.yml
Christian Clauss 0b3ebf86a3
Demonstrate a GitHub Action that runs pre-commit
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.
2020-01-29 14:20:58 +01:00

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