From f62987310d83a5970de09144f69d1ce6e01f4169 Mon Sep 17 00:00:00 2001 From: Johan Kromhout Date: Thu, 31 Oct 2024 09:12:22 +0100 Subject: [PATCH] When webtest fails, upload a screenshot of the error to github actions. --- .env.test | 1 + .github/workflows/test-integration-webtest.yml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/.env.test b/.env.test index 24cd0b92d..7e59651b9 100644 --- a/.env.test +++ b/.env.test @@ -11,3 +11,4 @@ jira_test_mode_storage_path='/var/www/html/var/issues.json' authorization_attribute_name='eduPersonEntitlement' surfconext_representative_authorization='urn:mace:surfnet.nl:surfnet.nl:sab:role:SURFconext-verantwoordelijke' test_idp_entity_ids='["http://mock-idp","test-idp-1"]' +PANTHER_ERROR_SCREENSHOT_DIR="./var/error-screenshots" \ No newline at end of file diff --git a/.github/workflows/test-integration-webtest.yml b/.github/workflows/test-integration-webtest.yml index 56c2c0e07..f58a40d89 100644 --- a/.github/workflows/test-integration-webtest.yml +++ b/.github/workflows/test-integration-webtest.yml @@ -58,3 +58,11 @@ jobs: working-directory: spdashboard run: | ${DOCKER_COMPOSE_PHP} sh -c 'composer webtest' + + - name: Upload error screenshots + if: failure() + uses: actions/upload-artifact@v4 + with: + name: error-screenshots + path: spdashboard/var/error-screenshots + retention-days: 2 \ No newline at end of file