Skip to content

Commit 2fd75d1

Browse files
committed
initial workflow for CI (pytest)
1 parent a25d3ab commit 2fd75d1

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Python CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
test:
15+
name: Run Tests
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
python-version: ['3.11', '3.14'] # the one we have in the Codespace + the latest major one.
20+
fail-fast: false # Continue testing other versions if one fails
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v5
25+
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v6
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
cache: 'pip'
31+
32+
- name: Install dependencies
33+
run: |
34+
python -m venv .venv
35+
source .venv/bin/activate
36+
python -m pip install --upgrade pip
37+
python -m pip install -r requirements.txt
38+
python -m pip install -r requirements-test.txt
39+
40+
- name: Run tests with pytest
41+
run: |
42+
source .venv/bin/activate
43+
pytest tests/ -v
44+
env:
45+
PYTHONPATH: ${{ github.workspace }}

0 commit comments

Comments
 (0)