adapt e2e github workflow to upload the report in case of failure

This commit is contained in:
mahula 2023-07-05 12:52:38 +02:00
parent 145a1b7812
commit 2facde4209
3 changed files with 6 additions and 6 deletions

View File

@ -50,9 +50,9 @@ jobs:
cd e2e-tests/
yarn
yarn run cypress run
- name: End-to-end tests | if tests failed, upload screenshots
- name: End-to-end tests | if tests failed, upload report
if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }}
uses: actions/upload-artifact@v3
with:
name: cypress-screenshots
path: /home/runner/work/gradido/gradido/e2e-tests/cypress/screenshots/
name: cypress-report-PR-${{ github.event.number }}
path: /home/runner/work/gradido/gradido/e2e-tests/cypress/reports/

View File

@ -1,6 +1,6 @@
const report = require("multiple-cucumber-html-reporter");
report.generate({
jsonDir: "cypress/reports/json_logs",
jsonDir: "cypress/json_logs",
reportPath: "./cypress/reports/cucumber_html_report",
metadata: {
app: {

View File

@ -11,12 +11,12 @@
"stepDefinitions": "cypress/support/step_definitions/*.ts",
"json": {
"enabled": true,
"output": "cypress/reports/json_logs/cucumber_log.json",
"output": "cypress/json_logs/cucumber_log.json",
"formatter": "cucumber-json-formatter"
},
"messages": {
"enabled": true,
"output": "cypress/reports/json_logs/messages.ndjson"
"output": "cypress/json_logs/messages.ndjson"
},
"html": {
"enabled": false