Skip to content

Commit 241b0b7

Browse files
Add Python test github workflow
1 parent 19724c1 commit 241b0b7

File tree

2 files changed

+35
-27
lines changed

2 files changed

+35
-27
lines changed

.github/workflows/pyhtontests.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Python Tests
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12", "3.13"] # Test multiple Python versions
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e .[test] # Install package in editable mode with test extras
28+
29+
- name: Run tests
30+
run: |
31+
python -m unittest
32+
33+
- name: Upload coverage
34+
uses: codecov/codecov-action@v3
35+
if: success() # Optional: Upload coverage to Codecov

.github/workflows/pythonpublish.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)