Skip to content

Commit 3c0201a

Browse files
ci: fix pytest exit code handling, add dev branch trigger
- Add set +e before pytest to prevent bash -e from exiting on code 5 - Add dev branch to push/pull_request triggers per maintainer request
1 parent d78da9d commit 3c0201a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [main, master]
5+
branches: [main, master, dev]
66
pull_request:
7-
branches: [main, master]
7+
branches: [main, master, dev]
88

99
jobs:
1010
lint-and-test:
@@ -43,12 +43,14 @@ jobs:
4343

4444
- name: Run tests (pytest)
4545
run: |
46+
set +e
4647
pytest --tb=short -q \
4748
--ignore=measurements/ \
4849
--ignore=0mq/ \
4950
--ignore=ratc/ \
5051
--ignore=linktest/
5152
status=$?
53+
set -e
5254
# Allow success if no tests are collected (pytest exit code 5)
5355
if [ "$status" -ne 0 ] && [ "$status" -ne 5 ]; then
5456
exit "$status"

0 commit comments

Comments
 (0)