Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init Pytest action #69

Merged
merged 3 commits into from
Sep 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/pytest.yml
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
Loading