Skip to content

Commit 6fc6d1d

Browse files
authored
Merge pull request #266 from mhabedank/add-workflow-matrix
Enhanced Testing Framework with Cross-Platform Support
2 parents 9f1ebd5 + 443c1d6 commit 6fc6d1d

1 file changed

Lines changed: 19 additions & 16 deletions

File tree

.github/workflows/pr-tests.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,48 @@
11
name: PR Unit Tests
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
branches:
67
- develop
78
- master # Add any other branches where you want to enforce tests
89

10+
concurrency:
11+
group: pytest-${{ github.head_ref || github.sha }}
12+
cancel-in-progress: true
13+
914
jobs:
1015
test:
11-
runs-on: ubuntu-latest
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest, windows-latest, macos-latest]
21+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1222

1323
steps:
1424
- name: Checkout Repository
1525
uses: actions/checkout@v4
1626

27+
- name: Install Poetry
28+
uses: abatilo/actions-poetry@v4
29+
1730
- name: Set up Python
1831
uses: actions/setup-python@v4
1932
with:
20-
python-version: "3.10" # Change this to match your setup
21-
22-
- name: Install Poetry
23-
run: |
24-
curl -sSL https://install.python-poetry.org | python3 -
25-
echo "$HOME/.local/bin" >> $GITHUB_PATH
26-
export PATH="$HOME/.local/bin:$PATH"
33+
python-version: ${{ matrix.python-version }}
34+
cache: 'poetry'
2735

2836
- name: Install Dependencies
2937
run: |
3038
python -m pip install --upgrade pip
31-
poetry install
32-
pip install pytest
33-
34-
- name: Install Package Locally
35-
run: |
36-
poetry build
37-
pip install dist/*.whl # Install the built package to fix "No module named 'mambular'"
39+
poetry install --with dev
3840
3941
- name: Run Unit Tests
4042
env:
4143
PYTHONPATH: ${{ github.workspace }} # Ensure the package is discoverable
42-
run: pytest tests/
44+
run: poetry run pytest tests/
45+
shell: bash
4346

4447
- name: Verify Tests Passed
4548
if: ${{ success() }}

0 commit comments

Comments
 (0)