forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 941 Bytes
/
pr-python-format.yml
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
name: "Check Python Formatting"
on:
pull_request:
# run on .py
paths:
- '**.py'
jobs:
python_formatting:
runs-on: ubuntu-latest
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39
with:
files: '**/*.py'
- name: "Listed files"
run: |
echo "Formatting files:"
echo "${{ steps.changed-files.outputs.all_changed_files }}"
- name: Setup Python env
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Python Formatting
uses: akaihola/darker@1.7.2
with:
options: "--check --diff --color"
version: "~=1.7.2"
src: "${{ steps.changed-files.outputs.all_changed_files }}"