Skip to content

Commit

Permalink
Add .pre-commit-config.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
raydouglass committed Sep 12, 2023
1 parent 6ec4c13 commit 2595580
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ concurrency:
cancel-in-progress: true

jobs:
format:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run black formatter
uses: psf/black@stable
with:
src: media_management_scripts
fetch-depth: 0
- name: Run pre-commit
uses: pre-commit/[email protected]
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
needs: format
needs: pre-commit
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black

0 comments on commit 2595580

Please sign in to comment.