Skip to content

Commit 0aad971

Browse files
committed
[tests] Run lint by separate test
1 parent ad17335 commit 0aad971

File tree

2 files changed

+31
-23
lines changed

2 files changed

+31
-23
lines changed

.github/workflows/lint.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: lint
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
lint:
11+
name: Run linters
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Set up Python 3.12
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.12"
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install ".[dev]"
24+
- name: Run linters
25+
run: |
26+
# See pyproject.toml
27+
isort --line-length 100 ssspy tests
28+
flake8 --max-line-length=100 --ignore=E203,W503,W504 --exclude ssspy/_version.py ssspy tests
29+
- name: Run formatters
30+
run: |
31+
python -m black --config pyproject.toml --check ssspy tests

.github/workflows/test_package_main.yaml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,6 @@ jobs:
4646
uses: codecov/codecov-action@v3
4747
with:
4848
fail_ci_if_error: true
49-
lint:
50-
name: Run linters
51-
runs-on: ubuntu-latest
52-
if: inputs.python-version == '3.12' && inputs.os == 'ubuntu-latest'
53-
steps:
54-
- name: Checkout
55-
uses: actions/checkout@v4
56-
- name: Set up Python 3.12
57-
uses: actions/setup-python@v4
58-
with:
59-
python-version: "3.12"
60-
- name: Install dependencies
61-
run: |
62-
python -m pip install --upgrade pip
63-
pip install ".[dev]"
64-
- name: Run linters
65-
run: |
66-
# See pyproject.toml
67-
isort --line-length 100 ssspy tests
68-
flake8 --max-line-length=100 --ignore=E203,W503,W504 --exclude ssspy/_version.py ssspy tests
69-
- name: Run formatters
70-
run: |
71-
python -m black --config pyproject.toml --check ssspy tests
7249
upload_package:
7350
needs:
7451
- build

0 commit comments

Comments
 (0)