Skip to content

Commit

Permalink
ci: reuse the pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
xenophonf committed Nov 30, 2023
1 parent 8384518 commit 368e614
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
name: Lint

on: [push, pull_request, workflow_dispatch]
# Trigger this workflow manually, by pushing commits to any branch, or
# by filing a pull request.
on:
workflow_dispatch:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
- id: cache-workdir
uses: actions/cache@v3
with:
key: workdir-${{ github.sha }}
path: .
- if: steps.cache-workdir.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
- run: python -m pip install .
- uses: pre-commit/action@v3.0.0

0 comments on commit 368e614

Please sign in to comment.