Skip to content

Commit df27af4

Browse files
committed
brought unit tests back
1 parent 7cf4eb0 commit df27af4

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

.github/workflows/backend-ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,46 @@ env:
2323
SCHEMA_REGISTRY_IMAGE: confluentinc/cp-schema-registry:7.5.0
2424

2525
jobs:
26+
unit:
27+
name: Unit Tests
28+
runs-on: ubuntu-latest
29+
30+
steps:
31+
- uses: actions/checkout@v6
32+
33+
- name: Set up uv
34+
uses: astral-sh/setup-uv@v7
35+
with:
36+
enable-cache: true
37+
cache-dependency-glob: "backend/uv.lock"
38+
39+
- name: Install Python dependencies
40+
run: |
41+
cd backend
42+
uv python install 3.12
43+
uv sync --frozen
44+
45+
- name: Run unit tests
46+
timeout-minutes: 5
47+
env:
48+
COVERAGE_CORE: sysmon
49+
run: |
50+
cd backend
51+
uv run pytest tests/unit -v -rs \
52+
--cov=app --cov-branch \
53+
--cov-report=xml --cov-report=term
54+
55+
- name: Upload coverage to Codecov
56+
uses: codecov/codecov-action@v5
57+
if: always()
58+
with:
59+
token: ${{ secrets.CODECOV_TOKEN }}
60+
files: backend/coverage.xml
61+
flags: backend-unit
62+
name: backend-unit-coverage
63+
fail_ci_if_error: false
64+
verbose: true
65+
2666
integration:
2767
name: Integration Tests
2868
runs-on: ubuntu-latest

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
</a>
2424
</p>
2525
<p align="center">
26-
<a href="https://app.codecov.io/gh/HardMax71/Integr8sCode/flags?flag=backend">
27-
<img src="https://img.shields.io/codecov/c/github/HardMax71/Integr8sCode?flag=backend&label=backend%20cov&logo=codecov" alt="Backend Coverage" />
26+
<a href="https://app.codecov.io/gh/HardMax71/Integr8sCode">
27+
<img src="https://img.shields.io/codecov/c/github/HardMax71/Integr8sCode?label=backend%20cov&logo=codecov" alt="Backend Coverage" />
2828
</a>
2929
<a href="https://app.codecov.io/gh/HardMax71/Integr8sCode/flags?flag=frontend">
3030
<img src="https://img.shields.io/codecov/c/github/HardMax71/Integr8sCode?flag=frontend&label=frontend%20cov&logo=codecov" alt="Frontend Coverage" />

0 commit comments

Comments
 (0)