Skip to content

Commit

Permalink
run pre-commit in GitHub check
Browse files Browse the repository at this point in the history
Change-Id: Iaeac9a11e8b930ecec4e6d48a3bb8dc5b989a68c
  • Loading branch information
garymm committed Jul 6, 2023
1 parent 22578d7 commit 5d1e703
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@ jobs:
- run: cd examples && bazelisk build //if_cuda:main --enable_cuda=False --config=bzlmod

- run: bazelisk shutdown

22 changes: 22 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: pre-commit

on:
push:
branches:
- main
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: pre-commit/action@v3.0.0
- uses: pre-commit-ci/lite-action@v1.0.1
if: always()

0 comments on commit 5d1e703

Please sign in to comment.