File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change 11name : Run Tests
22
3- on : [push, pull_request]
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
410
511jobs :
612 test :
1824 - name : Install dependencies
1925 run : |
2026 python -m pip install --upgrade pip
21- pip install pytest
27+ pip install -r requirements.txt # Install dependencies from requirements.txt
28+ pip install pytest # Ensure pytest is installed
2229
2330 - name : Run tests
24- run : pytest
25-
31+ run : |
32+ pytest --maxfail=1 --disable-warnings -q # Stop after 1 failed test, disable warnings, and show results quietly
33+
34+ - name : Upload test results (if tests fail)
35+ if : failure() # This step will only run if tests fail
36+ uses : actions/upload-artifact@v2
37+ with :
38+ name : test-results
39+ path : tests/test-results.xml # Make sure you have pytest XML output configured if you want this
40+
41+
You can’t perform that action at this time.
0 commit comments