-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (63 loc) · 1.7 KB
/
style-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
66
67
68
name: Style Check
on:
- push
- pull_request
- workflow_dispatch
- workflow_call
jobs:
fstring:
name: FString Formatting (flynt)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
python-version: "3.10"
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run flynt
run: tox -e fstring -- --fail-on-change --dry-run jupyter_libyt tests
sort_import:
name: Sort Import (isort)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
python-version: "3.10"
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run isort
run: tox -e sort_import -- --check --diff jupyter_libyt tests
format:
name: Code Formatting (black)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
python-version: "3.10"
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run black
run: tox -e format -- --check --diff jupyter_libyt tests
lint:
name: Linting (flake8)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
python-version: "3.10"
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Run flake8
run: tox -e lint