--- a/.github/workflows/run_tests_in_docker.yml Tue Aug 01 21:04:00 2023 +0200
+++ b/.github/workflows/run_tests_in_docker.yml Tue Aug 01 23:07:39 2023 +0200
@@ -35,7 +35,7 @@
cache-name: cache-docker
with:
path: /tmp/latest.tar
- key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('beremiz/tests/tools/Docker/beremiz-sikuli') }}
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('beremiz/tests/tools/Docker', 'beremiz/requirements.txt') }}
- if: ${{ steps.cache-docker-restore.outputs.cache-hit == false }}
name: Create docker image
--- a/.gitignore Tue Aug 01 21:04:00 2023 +0200
+++ b/.gitignore Tue Aug 01 23:07:39 2023 +0200
@@ -6,3 +6,4 @@
**/.svghmithumbs/**
**/my_*.der
**/my_*.pem
+tests/tools/Docker/requirements.txt
--- a/tests/tools/Docker/Dockerfile Tue Aug 01 21:04:00 2023 +0200
+++ b/tests/tools/Docker/Dockerfile Tue Aug 01 23:07:39 2023 +0200
@@ -85,23 +85,20 @@
RUN virtualenv ~/beremizenv
-# wxPython build req
-RUN ~/beremizenv/bin/pip install gattrdict
+COPY requirements.txt /home/$UNAME
-RUN ~/beremizenv/bin/pip install wxpython
+# wxpython build requirements
+RUN ~/beremizenv/bin/pip install `grep gattrdict /home/$UNAME/requirements.txt`
+# beremiz python requirements
+RUN ~/beremizenv/bin/pip install -r /home/$UNAME/requirements.txt
+
+# tests python requirements
RUN ~/beremizenv/bin/pip install \
- pytest pytest-timeout ddt \
- sslpsk posix_spawn \
- matplotlib lxml \
- zeroconf \
- pycountry \
- Pyro5 msgpack autobahn click
-
-RUN ~/beremizenv/bin/pip install \
- git+https://github.com/FreeOpcUa/opcua-asyncio.git@98a64897a2d171653353de2f36d33085aef65e82 \
- git+https://github.com/beremiz/nevow-py3.git@nevow-0.14.5.dev1
-
+ pytest pytest-timeout ddt
+
+#TODO sslpsk posix_spawn
+
RUN set -xe && \
cd /home/$UNAME && mkdir tessdata && \
wget -q https://github.com/tesseract-ocr/tessdata/archive/refs/tags/4.1.0.tar.gz \
--- a/tests/tools/Docker/build_docker_image.sh Tue Aug 01 21:04:00 2023 +0200
+++ b/tests/tools/Docker/build_docker_image.sh Tue Aug 01 23:07:39 2023 +0200
@@ -3,6 +3,7 @@
set -e
echo "Building docker image"
+cp -f ../../../requirements.txt requirements.txt
docker build \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \