-
Notifications
You must be signed in to change notification settings - Fork 1.6k
65 lines (60 loc) · 1.73 KB
/
format_check.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Code format and style check
on:
push:
branches:
- master
pull_request:
jobs:
black:
runs-on: ubuntu-latest
name: Black code formatter
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.9'
- name: Check code format
uses: psf/[email protected] # already includes args "--check --diff"
flake8:
runs-on: ubuntu-latest
name: Flake8 linter
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade wheel pip
pip install .[lint]
- name: Lint examples
run: flake8 examples --show-source
- name: Lint scripts
run: flake8 setup.py docs/conf.py scripts --show-source
- name: Lint tests
run: flake8 tests --show-source
- name: Lint moviepy
run: flake8 moviepy --show-source
isort:
runs-on: ubuntu-latest
name: isort import sorter
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install isort
- name: Check import order
run: isort --check-only moviepy tests examples docs/conf.py scripts