Skip to content

Commit 0011eba

Browse files
Ola AustineOla Austine
authored andcommitted
feat: adding workflows
1 parent 035a3aa commit 0011eba

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.11, 3.13]
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Cache pip
26+
uses: actions/cache@v4
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
30+
restore-keys: |
31+
${{ runner.os }}-pip-
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
37+
# Ensure the tools the tests expect are available
38+
pip install uv pytest
39+
# If this project exposes an installable package, install it so imports like `src.*` resolve
40+
if [ -f pyproject.toml ] || [ -f setup.cfg ]; then pip install -e .; fi
41+
42+
- name: Run tests
43+
env:
44+
# Make sure tests can import `src` package during pytest collection
45+
PYTHONPATH: ${{ github.workspace }}
46+
run: |
47+
uv run pytest src/tests -q

0 commit comments

Comments
 (0)