Skip to content

Commit 44985fc

Browse files
committed
exit with appropriate code
1 parent a6f4a16 commit 44985fc

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/smoke.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ jobs:
2727
pipenv install;
2828
- name: Run Smoke Tests in Win
2929
run: |
30+
set -e
3031
pipenv run pytest --fx-executable ./firefox/firefox -s -n 4 tests/security_and_privacy
31-
mv artifacts artifacts-win
32-
continue-on-error: true
32+
mv artifacts artifacts-win || true
33+
exit $TEST_EXIT_CODE
3334
- name: Upload artifacts
3435
if: always()
3536
uses: actions/upload-artifact@v4
@@ -57,9 +58,10 @@ jobs:
5758
pipenv install;
5859
- name: Run Smoke Tests in MacOS
5960
run: |
60-
pipenv run pytest --fx-executable ./firefox/firefox -s -n 4 tests/security_and_privacy
61-
mv artifacts artifacts-mac
62-
continue-on-error: true
61+
set -e
62+
pipenv run pytest --fx-executable ./firefox/firefox -s -n 4 tests/security_and_privacy || TEST_EXIT_CODE=$?
63+
mv artifacts artifacts-mac || true
64+
exit $TEST_EXIT_CODE
6365
- name: Upload artifacts
6466
if: always()
6567
uses: actions/upload-artifact@v4

conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def screenshot_content(driver: Firefox, opt_ci: bool, test_name: str) -> None:
2121
"""
2222
artifacts_loc = "artifacts" if opt_ci else ""
2323
current_time = str(datetime.datetime.now())
24+
current_time = re.sub(r"[^\w_. -]", "_", current_time)
2425
filename = f"{test_name}_{current_time}_image"
2526
if not filename.endswith(".png"):
2627
filename = filename + ".png"

0 commit comments

Comments
 (0)