@@ -4,8 +4,13 @@ services:
44    build :
55      context : ../.. 
66      dockerfile : contrib/containers/Containerfile 
7+       target : build 
78    volumes :
8-       - ../../packages:/app/packages 
9+       - ../../packages/common:/app/packages/common 
10+       - ../../packages/web-forms:/app/packages/web-forms 
11+       #  Mount each package individually to avoid overwriting generated dist
12+       - ../../packages/xpath/src:/app/packages/xpath/src 
13+       - ../../packages/xforms-engine/src:/app/packages/xforms-engine/src 
914    ports :
1015      - " ${WEB_FORMS_PORT:-5173}:5173" 
1116    command : yarn workspace @getodk/web-forms dev 
@@ -21,3 +26,23 @@ services:
2126      DJANGO_CORS_ALLOWED_ORIGIN : http://localhost:${WEB_FORMS_PORT:-5173} 
2227    ports :
2328      - " ${XLSFORM_ONLINE_PORT:-8558}:8000" 
29+ 
30+   tests :
31+     profiles : [test] 
32+     image : ghcr.io/getodk/web-forms:test 
33+     build :
34+       context : ../.. 
35+       dockerfile : contrib/containers/Containerfile 
36+       target : test 
37+     environment :
38+       DISPLAY : :0 
39+     volumes :
40+       - ../../packages/common:/app/packages/common 
41+       - ../../packages/web-forms:/app/packages/web-forms 
42+       #  Mount each package individually to avoid overwriting generated dist
43+       - ../../packages/xpath/src:/app/packages/xpath/src 
44+       - ../../packages/xforms-engine/src:/app/packages/xforms-engine/src 
45+       - ../../packages/xpath/test:/app/packages/xpath/test 
46+       - ../../packages/xforms-engine/test:/app/packages/xforms-engine/test 
47+       - /tmp/.X11-unix:/tmp/.X11-unix 
48+     command : ${TEST_CMD:-yarn run test} 
0 commit comments