Skip to content

Commit ba8384a

Browse files
committed
Add a pre-commit workflow for PRs
1 parent 3d5a25d commit ba8384a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
3+
name: Run pre-commit
4+
5+
on:
6+
pull_request:
7+
branches: ["develop", "main", "[0-9]+-*"]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.x'
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install .[all]
27+
- name: pre-commit checks
28+
run: |
29+
pre-commit run black --all-files
30+
pre-commit run isort --all-files

0 commit comments

Comments
 (0)