Skip to content

Commit

Permalink
Run pre-commit in GitHub Actions (#17)
Browse files Browse the repository at this point in the history
* Run pre-commit in GitHub Actions

* Don't run pre-commit from Python

* Review feedback
  • Loading branch information
KyleFromNVIDIA authored Feb 1, 2024
1 parent be8a0b2 commit 4d14f4c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint

on:
pull_request:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Lint
run: ./ci/lint.sh
8 changes: 8 additions & 0 deletions ci/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# Runs pre-commit

set -ue

pip install pre-commit

pre-commit run --all-files --show-diff-on-failure

0 comments on commit 4d14f4c

Please sign in to comment.