Skip to content

Commit b7bbde8

Browse files
committed
ci(workflow): trigger pylint after pytest
Only trigger pylint if pytest is successful.
1 parent 5168f7f commit b7bbde8

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/pylint.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
name: Pylint
22

3-
on: [push]
3+
on:
4+
workflow_run:
5+
workflows:
6+
- Run Pytest
7+
types:
8+
- completed
9+
push:
10+
branches:
11+
- main
12+
pull_request:
413

514
jobs:
615
build:
16+
needs: test
717
runs-on: ubuntu-latest
818
strategy:
919
matrix:

.github/workflows/pytest.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Run Pytest
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
27+
- name: Run Pytest
28+
run: |
29+
pytest
30+

0 commit comments

Comments
 (0)