-
Notifications
You must be signed in to change notification settings - Fork 15
47 lines (43 loc) · 1.07 KB
/
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
40
41
42
43
44
45
46
47
name: Format Python Code
on:
push:
branches:
- '**'
paths:
- "skscope/*.py"
- "pytest/*.py"
- ".github/workflows/format.yml"
pull_request:
paths:
- "skscope/*.py"
- "pytest/*.py"
- ".github/workflows/format.yml"
workflow_dispatch:
jobs:
python-code-format:
runs-on: ubuntu-latest
env:
PYTHON: "3.9"
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.9
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install packages
run: pip install black
- name: Formatter
run: |
black ./skscope
black ./pytest
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: Auto code format
title: Fixes by format action
body: This is an auto-generated PR with fixes.
labels: automated pr