summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2023-12-30 21:00:22 +0100
committerRodrigo Arias Mallo <rodarima@gmail.com>2023-12-30 22:04:56 +0100
commit95627efadf55c39901928ee730d22de55cdcc209 (patch)
treecdbba90f9eed51ad189d0ddab90ec02d2c985cc1 /.github/workflows
parent1711ba895376fef9eb9b5face92118b674db8015 (diff)
Add automatic rendering tests
These tests render a HTML page in Dillo and save a screenshot which is compared with another one rendered by a reference HTML file which doesn't make use of the feature under test. Running these tests require some additional dependencies to run a Xorg server and capture screenshots of the browser, so they are only enabled when configured with the --enable-html-tests option. Additionally, running Dillo and opening local files requires a working file dpi plugin. So, when running the HTML tests it is required that a working dpid server can be launched by Dillo. To do so, Dillo can be first installed to a prefix directory, the dpidrc file copied to ~/.dillo/ and then the DILLOBIN variable set to the path of the dillo binary under test.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml35
1 files changed, 35 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index bff98d11..8511ad45 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -136,3 +136,38 @@ jobs:
make
make check
ldd src/dillo
+ ubuntu-latest-html-tests:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ with:
+ fetch-depth: 1
+ - name: Install dependencies
+ run: sudo apt install -y libfltk1.3-dev libssl-dev xvfb x11-apps x11-utils imagemagick
+
+ - name: autogen
+ run: ./autogen.sh
+ - name: Make install dir
+ run: mkdir install
+ - name: configure
+ run: ./configure --prefix=$(readlink -f install) --enable-html-tests
+ - name: make
+ run: make
+ - name: make install
+ run: make install
+ - name: Copy config to .dillo
+ run: |
+ mkdir -p ~/.dillo/
+ cp install/etc/dillo/* ~/.dillo/
+ - name: make check
+ run: |
+ export DILLOBIN=$(readlink -f install/bin/dillo)
+ make check || (cat test/html/test-suite.log; false)
+# - name: Remove pipes
+# run: find test/html -type p -delete || true
+# - name: Archive production artifacts
+# uses: actions/upload-artifact@v3
+# with:
+# name: upload-html-test-results
+# path: |
+# build/test/html