File tree Expand file tree Collapse file tree 1 file changed +21
-15
lines changed Expand file tree Collapse file tree 1 file changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -2,31 +2,37 @@ name: Python Multi-OS Tests
2
2
3
3
on :
4
4
push :
5
- branches : [ "main" ]
6
- pull_request :
7
- branches : [ "main" ]
5
+ branches :
6
+ - main
8
7
9
8
jobs :
10
- build-and- test :
11
- runs-on : ${{ matrix.os }} # Matrix strategy picks OS
9
+ test :
10
+ runs-on : ${{ matrix.os }}
12
11
strategy :
13
12
matrix :
14
- include :
15
- - os : ubuntu-latest
16
- python-version : " 3.13"
17
- - os : windows-latest
18
- python-version : " 3.13"
19
- - os : macos-latest
20
- python-version : " 3.13"
13
+ os : [ubuntu-latest, macos-latest, windows-latest]
14
+ python-version : ["3.8", "3.9", "3.10", "3.11"]
15
+
21
16
steps :
22
- - name : Check out the repository
23
- uses : actions/checkout@v3
17
+ - name : Checkout Repository
18
+ uses : actions/checkout@v4
24
19
25
20
- name : Set up Python
26
21
uses : actions/setup-python@v4
27
22
with :
28
23
python-version : ${{ matrix.python-version }}
29
24
25
+ - name : Install Dependencies
26
+ run : |
27
+ python -m pip install --upgrade pip
28
+ pip install -r requirements.txt || true # Ignore if no requirements.txt exists
29
+
30
30
- name : Run Tests
31
+ id : run_tests
31
32
run : |
32
- python -m unittest discover -s tests
33
+ python -m unittest discover -s tests
34
+ continue-on-error : false # Stop on failure
35
+
36
+ - name : Store Test Results
37
+ if : always()
38
+ run : echo "TESTS_PASSED=${{ job.status }}" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments