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

ontariotech/task-allocation Private

[참조 MVP] 다중 농기계 작업 배분 A-SW — 농기계 용량을 고려해 작업구역을 예상 완료시간이 최소가 되도록 배분합니다.

https://git.agrithing.ai/ontariotech/task-allocation.git
7 commits
COMMIT DETAIL

ci: verify contract tests and evidence package

A-SW Reference Factory <[email protected]> · 2026. 8. 2. 오전 7:38:06
8da6f7ac071d2ac0b12e118272993459d19dedf4
2 changed files +47 −0 parent 9d1acf5
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(len(result["allocations"]), 2)
14 + self.assertEqual(sum(len(a["tasks"]) for a in result["allocations"]), 3)
15 + self.assertLessEqual(result["makespan"], 5)
16 +
17 + if __name__ == "__main__":
18 + unittest.main()