Skip to content

Commit 18ceea1

Browse files
TST: skip tests for draft PRs and non-Python files
1 parent 9aa050b commit 18ceea1

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/test_pytest.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
name: PyTest
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
paths:
7+
- '**.py'
48

59
jobs:
6-
build:
10+
fail_if_pull_request_is_draft:
11+
if: github.event.pull_request.draft == true
12+
runs-on: ubuntu-18.04
13+
steps:
14+
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
15+
run: exit 1
16+
run_pytest_and_doctest:
717
runs-on: ${{ matrix.os }}
818
strategy:
919
matrix:
@@ -31,4 +41,4 @@ jobs:
3141
run: |
3242
pytest
3343
cd rocketpy
34-
pytest --doctest-modules
44+
pytest --doctest-modules

0 commit comments

Comments
 (0)