diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 70023de..f575487 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -12,6 +12,8 @@ on: jobs: test: runs-on: ubuntu-latest + container: + image: gitea.tourolle.paris/dtourolle/pyphotoalbum-ci:latest strategy: matrix: python-version: ['3.11', '3.12', '3.13', '3.14'] @@ -25,16 +27,11 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install system dependencies - run: | - sudo apt-get update -qq - sudo apt-get install -y libgl1 libglib2.0-0 - - name: Install Python dependencies run: | python -m pip install --upgrade pip pip install -e ".[dev]" - pip install coverage-badge interrogate + pip install setuptools coverage-badge interrogate - name: Download initial failed badges run: | diff --git a/Dockerfile.ci b/Dockerfile.ci new file mode 100644 index 0000000..c8d2113 --- /dev/null +++ b/Dockerfile.ci @@ -0,0 +1,43 @@ +# CI test image for pyPhotoAlbum +# Build: docker build -f Dockerfile.ci -t gitea.tourolle.paris/dtourolle/pyphotoalbum-ci:latest . +# Push: docker push gitea.tourolle.paris/dtourolle/pyphotoalbum-ci:latest +FROM ubuntu:24.04 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y \ + # Python + python3 \ + python3-venv \ + python3-pip \ + # PyQt6 / OpenGL runtime deps + libgl1 \ + libglib2.0-0 \ + libegl1 \ + libfontconfig1 \ + libfreetype6 \ + libdbus-1-3 \ + # XCB / display (needed even with offscreen platform) + libx11-6 \ + libx11-xcb1 \ + libxcb1 \ + libxcb-cursor0 \ + libxcb-glx0 \ + libxcb-icccm4 \ + libxcb-image0 \ + libxcb-keysyms1 \ + libxcb-randr0 \ + libxcb-render0 \ + libxcb-render-util0 \ + libxcb-shape0 \ + libxcb-shm0 \ + libxcb-sync1 \ + libxcb-xfixes0 \ + libxcb-xinerama0 \ + libxcb-xkb1 \ + libxkbcommon0 \ + libxkbcommon-x11-0 \ + # Misc tools used in workflows + curl \ + git \ + && rm -rf /var/lib/apt/lists/*