-
Notifications
You must be signed in to change notification settings - Fork 8
43 lines (37 loc) · 1.05 KB
/
validate-python.yml
File metadata and controls
43 lines (37 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Python Formatting Validation
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "**/*.py"
- ".pre-commit-config.yaml"
- "Makefile"
- "pyproject.toml"
- ".github/workflow/validate-python.yml"
pull_request_target:
types: [closed]
paths:
- "**/*.py"
- ".pre-commit-config.yaml"
- "Makefile"
- "pyproject.toml"
- ".github/workflow/validate-python.yml"
jobs:
formatting-test:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v6
with:
# For pull_request_target on forks, ensure we check out the merge commit or default branch safely
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install python formatting test dependencies
run: pip install ruff
- name: Run Formatting Tests
run: make format-python-check