Skip to content

Commit 785a0f5

Browse files
committed
add automated testing in github workflow
1 parent 550e204 commit 785a0f5

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

.github/workflows/test.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Install dependencies
5151
run: |
5252
python -m pip install --upgrade pip
53-
pip install hatch
53+
pip install hatch pytest pytest-cov
5454
5555
- name: Build and lint Widget
5656
run: |
@@ -65,6 +65,12 @@ jobs:
6565
hatch fmt --check
6666
hatch run test:cov
6767
68+
- name: Build and test Schema Wrapper
69+
run: |
70+
cd packages/schema_wrapper
71+
pip install -e .
72+
pytest test/ --cov=schema_wrapper --cov-report=term-missing
73+
6874
rust:
6975
name: Test in Rust
7076

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "schema-wrapper"
7+
version = "0.1.0"
8+
description = "Schema wrapper classes for Mosaic"
9+
readme = "README.md"
10+
requires-python = ">=3.9"
11+
12+
[tool.hatch.build.targets.wheel]
13+
packages = ["."] # Changed from "src" to "." since files are in root
14+
15+
[tool.pytest.ini_options]
16+
testpaths = ["test"]
17+
python_files = ["test_*.py"]
18+
addopts = "-v"
19+
20+
[tool.coverage.run]
21+
source = ["."]
22+
23+
[tool.coverage.report]
24+
exclude_lines = [
25+
"pragma: no cover",
26+
"def __repr__",
27+
"if __name__ == .__main__.:",
28+
"raise NotImplementedError",
29+
]
30+
31+
[tool.ruff]
32+
line-length = 88
33+
target-version = "py39"

packages/schema_wrapper/test/test.py packages/schema_wrapper/test/test_generated_classes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pathlib import Path
77
import pytest
88

9-
from packages.schema_wrapper.generated_classes import (
9+
from ..generated_classes import (
1010
AggregateExpression,
1111
AggregateTransform,
1212
ChannelValue,

0 commit comments

Comments
 (0)