-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.test
More file actions
42 lines (38 loc) · 1.45 KB
/
Dockerfile.test
File metadata and controls
42 lines (38 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM php:8.1-cli
# Zero system dependencies - all Tcl/Tk and X11 libs are bundled
# Only needs libffi-dev for PHP FFI extension and xvfb for virtual display
RUN apt-get update && apt-get install -y --no-install-recommends \
libffi-dev xvfb \
&& docker-php-ext-install ffi \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /app
COPY . .
RUN composer install --no-interaction --no-dev
CMD ["sh", "-c", "\
Xvfb :99 -screen 0 1024x768x24 & \
export DISPLAY=:99 && \
sleep 1 && \
echo '=== Integration Test ===' && \
php tests/index_test.php && \
echo '=== AdditionalWidgetsTest ===' && \
php tests/widgets_test/AdditionalWidgetsTest.php && \
echo '=== ButtonTest ===' && \
php tests/widgets_test/ButtonTest.php && \
echo '=== GeometryTest ===' && \
php tests/widgets_test/GeometryTest.php && \
echo '=== InputTest ===' && \
php tests/widgets_test/InputTest.php && \
echo '=== LabelTest ===' && \
php tests/widgets_test/LabelTest.php && \
echo '=== MenuTest ===' && \
php tests/widgets_test/MenuTest.php && \
echo '=== MenubuttonTest ===' && \
php tests/widgets_test/MenubuttonTest.php && \
echo '=== MessageTest ===' && \
php tests/widgets_test/MessageTest.php && \
echo '=== WindowTest ===' && \
php tests/widgets_test/WindowTest.php && \
echo '' && \
echo 'ALL TESTS PASSED - Zero system dependencies' \
"]