Skip to content

Commit 682cbfb

Browse files
authored
ci: update to run CLI on CI workflow (#188)
* ci: update to run CLI on CI workflow Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> * ci: not to spawn rerun viewer on CI device Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp> --------- Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
1 parent e6f1244 commit 682cbfb

32 files changed

Lines changed: 32 additions & 21 deletions

.github/workflows/build-and-test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ jobs:
4646
if: ${{ steps.is-changed.outputs.changes == 'true'}}
4747
run: uv run pytest --cov-report xml:coverage.xml --cov=t4_devkit
4848

49+
- name: Run CLIs
50+
if: ${{ steps.is-changed.outputs.changes == 'true'}}
51+
run: |
52+
uv run t4viz scene ./tests/sample/t4dataset -o ./output
53+
uv run t4viz instance ./tests/sample/t4dataset 90f0c98d1a040d5360847f576c5528f8 -o ./output
54+
uv run t4viz pointcloud ./tests/sample/t4dataset -o ./output
55+
uv run t4sanity ./tests/sample -iw
56+
4957
- name: Get test coverage
5058
if: ${{ steps.is-changed.outputs.changes == 'true'}} && ${{ matrix.python-version == '3.10' }}
5159
uses: orgoro/coverage@v3.1

tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,3 +308,8 @@ def dummy_camera_calibration() -> tuple[tuple[int, int], NDArrayFloat]:
308308
)
309309

310310
return img_size, intrinsic
311+
312+
313+
@pytest.fixture(scope="session")
314+
def dummy_lanelet_path() -> str:
315+
return "tests/sample/t4dataset/map/lanelet2_map.osm"

tests/lanelet/test_parser.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from t4_devkit.lanelet import LaneletParser
44

55

6-
def test_lanelet_parser() -> None:
6+
def test_lanelet_parser(dummy_lanelet_path) -> None:
77
"""Test `LaneletParser`."""
8-
lanelet_path = "tests/sample/map/lanelet2_map.osm"
9-
_ = LaneletParser(lanelet_path)
8+
_ = LaneletParser(dummy_lanelet_path)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)