Skip to content

Commit 67aa591

Browse files
authored
Merge pull request #27 from GitHubSecurityLab/p--python-ci
initial workflow for CI (pytest)
2 parents 0ed0856 + 97db5ef commit 67aa591

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/ci.yml

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

0 commit comments

Comments
 (0)