diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..32b2bfc --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.venv +__pycache__ +dist +.mypy_cache +.github \ No newline at end of file diff --git a/.github/Dockerfile-gtk4 b/.github/Dockerfile-gtk4 new file mode 100644 index 0000000..d1343a6 --- /dev/null +++ b/.github/Dockerfile-gtk4 @@ -0,0 +1,15 @@ +FROM fedora:33 + +ENV TEST_GTK_VERSION "4.0" + +RUN yum install -y gcc gtk4 cairo-devel cairo-gobject-devel gobject-introspection-devel python3-devel python3-pip xorg-x11-server-Xvfb +RUN pip3 install -U poetry pytest + +WORKDIR /work + +COPY . /work/ + +RUN poetry install +# Override PyGObject with the master version +RUN poetry run pip install -U https://gitlab.gnome.org/GNOME/pygobject/-/archive/master/pygobject-master.tar.gz +RUN poetry run xvfb-run pytest --cov=gaphas diff --git a/.github/workflows/build-gtk4.yml b/.github/workflows/build-gtk4.yml new file mode 100644 index 0000000..afd99e0 --- /dev/null +++ b/.github/workflows/build-gtk4.yml @@ -0,0 +1,12 @@ +name: build +on: + push: + +jobs: + build: + name: GTK 4 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build + run: docker build -f .github/Dockerfile-gtk4 .