-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Init Pytest action * debug version id * Quotes on version numbers
- Loading branch information
1 parent
eab7a5e
commit a2e077e
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Python Tests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] # Test with Python 3.10 to the latest available version | ||
|
||
steps: | ||
# Checkout the latest commit associated with the PR | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Debug matrix value | ||
run: echo "Python version is ${{ matrix.python-version }}" | ||
|
||
# Set up Python based on the matrix version | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Install dependencies, including test dependencies from pyproject.toml | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install '.[test]' # Install all dependencies, including test-specific ones | ||
# Run pytest on the specified directory | ||
- name: Run tests | ||
run: pytest src/python/tests |