-
Notifications
You must be signed in to change notification settings - Fork 7
33 lines (32 loc) · 952 Bytes
/
yapf.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
name: yapf
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- '**/*.py'
merge_group: # Needed for required workflows
# Run after a review has been submitted (this is a required workflow which
# might not be triggered when no code changes -- trigger before going to
# merge queue).
pull_request_review:
types: [submitted]
jobs:
yapf:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install --upgrade 'yapf>=0.30.0'
- name: Register matcher
run:
echo ::add-matcher::./.github/python_matcher.json
- name: Test code formatting with yapf
run:
yapf --recursive --diff .