A-SW Hub / Repositories
Local Gitea · READ ONLY
← 저장소 Repositories
REPOSITORY

jbnu/spatial-information-db Private

[참조 MVP] 농경지 공간정보 DB — 농경지·장애물 GeoJSON 피처를 경계상자 기준으로 검색하는 경량 저장 모델입니다.

https://git.agrithing.ai/jbnu/spatial-information-db.git
6 commits
COMMIT DETAIL

ci: verify contract tests and evidence package

A-SW Reference Factory <[email protected]> · 2026. 8. 2. 오전 7:38:04
29690c74428494bfef299b1883709e283e63a39b
2 changed files +47 −0 parent 68d8ce2
added .gitea/workflows/verify.yml +29−0 View file
@@ -0,0 +1,29 @@
1 + name: Verify reference MVP
2 +
3 + on:
4 + push:
5 + branches: [main]
6 + pull_request:
7 +
8 + jobs:
9 + verify:
10 + runs-on: ubuntu-latest
11 + steps:
12 + - uses: actions/checkout@v4
13 + - name: Validate interface contract
14 + run: python -m json.tool contracts/component.interface.json >/dev/null
15 + - name: Run component tests
16 + run: python -m unittest discover -s tests -v
17 + - name: Exercise example
18 + run: python run.py examples/input.json | python -m json.tool >/dev/null
19 + - name: Build evidence package
20 + run: |
21 + mkdir -p dist
22 + tar -czf dist/reference-mvp.tar.gz asw_component contracts examples release README.md run.py
23 + sha256sum dist/reference-mvp.tar.gz > dist/checksums.sha256
24 + - name: Upload evidence
25 + uses: christopherhx/gitea-upload-artifact@v4
26 + with:
27 + name: reference-mvp-evidence
28 + path: dist
29 + retention-days: 30
added tests/test_component.py +18−0 View file
@@ -0,0 +1,18 @@
1 + from __future__ import annotations
2 + import json
3 + import unittest
4 + from pathlib import Path
5 + from asw_component import execute
6 +
7 + ROOT = Path(__file__).resolve().parents[1]
8 +
9 + class ComponentTest(unittest.TestCase):
10 + def test_reference_scenario(self):
11 + payload = json.loads((ROOT / "examples/input.json").read_text(encoding="utf-8"))
12 + result = execute(payload)
13 + self.assertEqual(result["count"], 1)
14 + self.assertEqual(result["features"][0]["id"], "field-1")
15 + self.assertEqual(result["type"], "FeatureCollection")
16 +
17 + if __name__ == "__main__":
18 + unittest.main()