Skip to content

Commit d4cbb10

Browse files
authored
Merge pull request #10 from martysai/ci/github-actions
2 parents bd38d1f + 14a64ed commit d4cbb10

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, qwen2.5-coder]
6+
pull_request:
7+
branches: [master, qwen2.5-coder]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python 3.12
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.12"
20+
cache: 'pip'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -e ".[dev]"
26+
27+
- name: Run linter
28+
run: python -m ruff check .
29+
continue-on-error: true
30+
31+
- name: Run tests with coverage
32+
run: |
33+
python -m pytest tests/ -v --tb=short --cov=src --cov-report=term-missing --cov-report=xml
34+
35+
- name: Upload coverage to Codecov
36+
uses: codecov/codecov-action@v4
37+
with:
38+
token: ${{ secrets.CODECOV_TOKEN }}
39+
files: ./coverage.xml
40+
flags: unittests
41+
name: ci-coverage
42+
fail_ci_if_error: false
43+
verbose: true

codecov.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
comment:
2+
layout: "reach,diff,flags,tree"
3+
behavior: default
4+
require_changes: false
5+
require_base: no
6+
require_head: yes
7+
8+
# Optional: configure thresholds or ignore patterns below
9+
# coverage:
10+
# precision: 2
11+
# round: down

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ dependencies = [
3030
[project.optional-dependencies]
3131
dev = [
3232
"pytest>=7.0",
33+
"pytest-cov>=4.0",
3334
"ruff>=0.1.0",
3435
"httpx>=0.24.0",
3536
]

0 commit comments

Comments
 (0)