File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : PR Unit Tests
22
33on :
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+
914jobs :
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 : |
3947 - name : Run Unit Tests
4048 env :
4149 PYTHONPATH : ${{ github.workspace }} # Ensure the package is discoverable
42- run : pytest tests/
50+ run : poetry run pytest tests/
51+ shell : bash
4352
4453 - name : Verify Tests Passed
4554 if : ${{ success() }}
You can’t perform that action at this time.
0 commit comments