Skip to content

Commit c603ad4

Browse files
committed
Move lint to another workflow
1 parent a016eb8 commit c603ad4

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

.github/workflows/lint.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: lint with pre-commit
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 10
11+
env:
12+
PYTHONPATH: "."
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.10"
18+
cache: 'pip'
19+
cache-dependency-path: 'setup.py'
20+
- uses: actions/cache@v3
21+
with:
22+
path: ~/.cache/pre-commit
23+
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
24+
- run: python -m pip install -e .[dev]
25+
- run: python -m pip install pre-commit
26+
- run: pre-commit run --show-diff-on-failure --color=always --all-files

.github/workflows/tests.yml

-20
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,3 @@ jobs:
5050
if: always() # always run even if the previous step fails
5151
with:
5252
report_paths: /home/runner/work/pytest-splinter/pytest-splinter/test-results/junit.xml
53-
54-
lint:
55-
runs-on: ubuntu-latest
56-
timeout-minutes: 10
57-
env:
58-
PYTHONPATH: "."
59-
steps:
60-
- uses: actions/checkout@v3
61-
- uses: actions/setup-python@v4
62-
with:
63-
python-version: "3.10"
64-
cache: 'pip'
65-
cache-dependency-path: 'setup.py'
66-
- uses: actions/cache@v3
67-
with:
68-
path: ~/.cache/pre-commit
69-
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
70-
- run: python -m pip install -e .[dev]
71-
- run: python -m pip install pre-commit
72-
- run: pre-commit run --show-diff-on-failure --color=always --all-files

0 commit comments

Comments
 (0)