Skip to content

Commit d0b4fb4

Browse files
authored
TESTS_PASSED bool for triggering release and version bump
1 parent e4340e0 commit d0b4fb4

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,37 @@ name: Python Multi-OS Tests
22

33
on:
44
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
5+
branches:
6+
- main
87

98
jobs:
10-
build-and-test:
11-
runs-on: ${{ matrix.os }} # Matrix strategy picks OS
9+
test:
10+
runs-on: ${{ matrix.os }}
1211
strategy:
1312
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+
2116
steps:
22-
- name: Check out the repository
23-
uses: actions/checkout@v3
17+
- name: Checkout Repository
18+
uses: actions/checkout@v4
2419

2520
- name: Set up Python
2621
uses: actions/setup-python@v4
2722
with:
2823
python-version: ${{ matrix.python-version }}
2924

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+
3030
- name: Run Tests
31+
id: run_tests
3132
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

0 commit comments

Comments
 (0)