Skip to content

Commit 1fd1114

Browse files
natifridmanclaude
andcommitted
Add GitHub Actions workflow for PR testing
- Add test.yml workflow that runs on pull requests to main - Include linting, pytest execution, and coverage reporting - Use uv for efficient dependency management with Python 3.11 - Remove redundant python-lint.yaml workflow - Integrate Codecov for test coverage tracking 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 396e013 commit 1fd1114

File tree

2 files changed

+59
-27
lines changed

2 files changed

+59
-27
lines changed

.github/workflows/python-lint.yaml

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

.github/workflows/test.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
lint:
9+
name: Code Linting
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v3
17+
with:
18+
version: "latest"
19+
20+
- name: Set up Python
21+
run: uv python install 3.11
22+
23+
- name: Install dependencies
24+
run: uv sync --dev
25+
26+
- name: Run flake8
27+
run: uv run flake8 src/ --max-line-length=120 --ignore=E501,W503
28+
29+
test:
30+
name: Tests & Coverage
31+
runs-on: ubuntu-latest
32+
needs: lint
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Install uv
38+
uses: astral-sh/setup-uv@v3
39+
with:
40+
version: "latest"
41+
42+
- name: Set up Python
43+
run: uv python install 3.11
44+
45+
- name: Install dependencies
46+
run: uv sync --dev
47+
48+
- name: Run tests with coverage
49+
run: |
50+
uv add --dev pytest-cov
51+
uv run pytest tests/ --cov=src --cov-report=xml --cov-report=term -v --tb=short
52+
53+
- name: Upload coverage to Codecov
54+
uses: codecov/codecov-action@v4
55+
with:
56+
file: ./coverage.xml
57+
flags: unittests
58+
name: codecov-umbrella
59+
fail_ci_if_error: false

0 commit comments

Comments
 (0)