From 7c1ee48f7fc3559ab959199c4ccb074124874891 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Mon, 5 Apr 2021 11:12:09 +0100 Subject: [PATCH] Actually add github action --- .github/workflows/pre-commit.yml | 24 ++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 000000000..d93943219 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,24 @@ +name: pre-commit + +on: + push: + branches: + - main + pull_request: + +jobs: + pre-commit: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - uses: pre-commit/action@v2.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index ebbce3ab1..7cb1eb249 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ MANIFEST coverage.* +!.github !.gitignore !.pre-commit-config.yaml !.travis.yml