Skip to content

Commit

Permalink
Add separate linting CI
Browse files Browse the repository at this point in the history
  • Loading branch information
paddyroddy committed Feb 18, 2022
1 parent ddb315f commit 169d6cc
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/linting_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: checks

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v2

- name: set up python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV

- name: cache stuff
uses: actions/cache@v2
with:
path: |
${{ env.pythonLocation }}
~/.cache/pre-commit
key: |
pre-commit-${{ env.PY }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: install dependencies
run: pip install pre-commit

- name: Install pre-commit hooks
run: pre-commit install

# This will run on all files in the repo not just those that have been
# committed. Once formatting has been applied once globally, from then on
# the files being changed by pre-commit should be just those that are
# being committed - provided that people are using the pre-commit hook to
# format their code.
- name: run pre-commit
run: pre-commit run --all-files --color always

0 comments on commit 169d6cc

Please sign in to comment.