[P] Integrate MapView testing into CI pipeline
Some checks failed
Some checks failed
This commit is contained in:
14
MapView/Dockerfile-test
Normal file
14
MapView/Dockerfile-test
Normal file
@@ -0,0 +1,14 @@
|
||||
# Use the official Python image as the base image
|
||||
FROM python:latest
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
# Copy the requirements.txt file and install dependencies
|
||||
COPY MapView/requirements.txt .
|
||||
RUN sed -i 's/==.*//' requirements.txt
|
||||
|
||||
RUN apt update && apt install -y libgl-dev libsdl1.2-dev
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN pip install --root-user-action ignore --no-cache-dir python-unittest kivy[base] pygame
|
||||
|
||||
CMD ["./test-entry.sh"]
|
||||
3
MapView/test-entry.sh
Executable file
3
MapView/test-entry.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
PYTHONPATH=$PWD python3 -m unittest tests.test_mp
|
||||
@@ -6,8 +6,8 @@ sys.modules['lineMapLayer'] = Mock()
|
||||
sys.modules['datasource'] = Mock()
|
||||
sys.modules['config'] = Mock()
|
||||
|
||||
from MapView.main import get_lat_lon, MapViewApp
|
||||
from MapView.datasource import Datasource as DataSourceClass
|
||||
from main import get_lat_lon, MapViewApp
|
||||
from datasource import Datasource as DataSourceClass
|
||||
|
||||
|
||||
# -----------------------
|
||||
@@ -89,4 +89,4 @@ class TestMapLatLonToProcessedAgentData(unittest.TestCase):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user