From 50edbab586faf15c542096bd8410082c9acd7d88 Mon Sep 17 00:00:00 2001 From: ix5 Date: Fri, 27 May 2022 04:16:28 +0200 Subject: [PATCH] .github: e2e: Compare screenshots --- .github/workflows/e2e-tests.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index db65cef84..e3e0802a9 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -7,14 +7,14 @@ on: - "package.json" - "docker/**" - "Dockerfile" - - ".github/workflows/docker-compose.yml" + - ".github/workflows/e2e-tests.yml" push: paths: - "isso/**" - "package.json" - "docker/**" - "Dockerfile" - - ".github/workflows/docker-compose.yml" + - ".github/workflows/e2e-tests.yml" jobs: test: @@ -56,3 +56,26 @@ jobs: --env ISSO_ENDPOINT='http://isso-dev.local:8080' \ --network container:isso-server \ ${{ env.TESTBED_IMAGE }} npm run test-integration + + - uses: actions/upload-artifact@v2 + with: + name: screenshots + path: isso/js/tests/integration/screenshots/*.png + + compare-screenshots: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/download-artifact@v3 + with: + name: screenshots + path: isso/js/tests/integration/screenshots/ + + - name: Display structure of downloaded files + run: ls -lR + working-directory: isso/js/tests/integration/screenshots/ + + - name: Compare screenshots + run: bash isso/js/tests/integration/compare-hashes.sh