Skip to content

Commit 7174776

Browse files
committed
condense workflows into formatters.yml and lint.yml
1 parent 745ec09 commit 7174776

File tree

4 files changed

+98
-81
lines changed

4 files changed

+98
-81
lines changed

.github/workflows/black.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
name: Ruff
1+
name: Formatters
22

33
on:
44
push:
55
pull_request:
66
types: [opened, reopened, synchronize]
77

88
jobs:
9-
check:
9+
black:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
fail-fast: false
1313
matrix:
1414
python-version: [ '3.11', '3.12', '3.13' ]
1515

16-
name: check ${{ matrix.python-version }}
16+
name: Black on ${{ matrix.python-version }}
1717
steps:
1818
- uses: actions/checkout@v3
1919
with:
@@ -27,13 +27,38 @@ jobs:
2727
- name: Install dependencies
2828
id: install-deps
2929
run: |
30-
pip install .[tests,docs]
31-
pip install ruff
32-
33-
- name: Run Ruff Linter
30+
pip install .[tests]
31+
pip install black
32+
33+
- name: Run black
3434
if: ${{ always() && steps.install-deps.outcome == 'success' }}
35-
uses: astral-sh/ruff-action@v3
35+
run: |
36+
black --check flogin examples tests
3637
38+
ruff:
39+
runs-on: ubuntu-latest
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
python-version: [ '3.11', '3.12', '3.13' ]
44+
45+
name: Ruff Formatter on ${{ matrix.python-version }}
46+
steps:
47+
- uses: actions/checkout@v3
48+
with:
49+
fetch-depth: 0
50+
51+
- name: Set up CPython ${{ matrix.python-version }}
52+
uses: actions/setup-python@v4
53+
with:
54+
python-version: ${{ matrix.python-version }}
55+
56+
- name: Install dependencies
57+
id: install-deps
58+
run: |
59+
pip install .[tests]
60+
pip install ruff
61+
3762
- name: Run Ruff Formatter
3863
if: ${{ always() && steps.install-deps.outcome == 'success' }}
3964
run: |

.github/workflows/lint.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, reopened, synchronize]
7+
8+
jobs:
9+
pyright:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: [ '3.11', '3.12', '3.13' ]
15+
16+
name: Pyright on ${{ matrix.python-version }}
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Set up CPython ${{ matrix.python-version }}
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install dependencies
28+
id: install-deps
29+
run: |
30+
pip install .[tests]
31+
pip install pyright
32+
33+
- name: Run pyright
34+
id: run-pyright
35+
if: ${{ always() && steps.install-deps.outcome == 'success' }}
36+
run: |
37+
pyright --pythonversion ${{ matrix.python-version }} --pythonplatform Windows --warnings flogin examples tests
38+
39+
ruff:
40+
runs-on: ubuntu-latest
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
python-version: [ '3.11', '3.12', '3.13' ]
45+
46+
name: Ruff Linter on ${{ matrix.python-version }}
47+
steps:
48+
- uses: actions/checkout@v3
49+
with:
50+
fetch-depth: 0
51+
52+
- name: Set up CPython ${{ matrix.python-version }}
53+
uses: actions/setup-python@v4
54+
with:
55+
python-version: ${{ matrix.python-version }}
56+
57+
- name: Install dependencies
58+
id: install-deps
59+
run: |
60+
pip install .[tests,docs]
61+
pip install ruff
62+
63+
- name: Run Ruff Linter
64+
if: ${{ always() && steps.install-deps.outcome == 'success' }}
65+
uses: astral-sh/ruff-action@v3

.github/workflows/pyright.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)