mirror of
https://github.com/element-hq/element-web
synced 2024-11-21 16:55:34 +03:00
Cypress: write logs to file (#11712)
... in an attempt to make the github actions output easier to grok
This commit is contained in:
parent
9d1f10e4be
commit
241df0ba0a
4 changed files with 15 additions and 3 deletions
3
.github/workflows/cypress.yaml
vendored
3
.github/workflows/cypress.yaml
vendored
|
@ -224,13 +224,14 @@ jobs:
|
||||||
matrix-react-sdk/cypress/screenshots
|
matrix-react-sdk/cypress/screenshots
|
||||||
matrix-react-sdk/cypress/videos
|
matrix-react-sdk/cypress/videos
|
||||||
matrix-react-sdk/cypress/synapselogs
|
matrix-react-sdk/cypress/synapselogs
|
||||||
|
matrix-react-sdk/cypress/results/cypresslogs
|
||||||
|
|
||||||
- name: Upload reports
|
- name: Upload reports
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cypress-junit
|
name: cypress-junit
|
||||||
path: matrix-react-sdk/cypress/results
|
path: matrix-react-sdk/cypress/results/junit
|
||||||
|
|
||||||
report:
|
report:
|
||||||
name: Report results
|
name: Report results
|
||||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -25,6 +25,8 @@ package-lock.json
|
||||||
/cypress/screenshots
|
/cypress/screenshots
|
||||||
/cypress/synapselogs
|
/cypress/synapselogs
|
||||||
/cypress/dendritelogs
|
/cypress/dendritelogs
|
||||||
|
/cypress/results
|
||||||
|
|
||||||
# These could have files in them but don't currently
|
# These could have files in them but don't currently
|
||||||
# Cypress will still auto-create them though...
|
# Cypress will still auto-create them though...
|
||||||
/cypress/performance
|
/cypress/performance
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"reporterEnabled": "spec, mocha-junit-reporter",
|
"reporterEnabled": "spec, mocha-junit-reporter",
|
||||||
"mochaJunitReporterReporterOptions": {
|
"mochaJunitReporterReporterOptions": {
|
||||||
"mochaFile": "cypress/results/results-[hash].xml",
|
"mochaFile": "cypress/results/junit/results-[hash].xml",
|
||||||
"useFullSuiteTitle": true
|
"useFullSuiteTitle": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,15 @@ export default function (on: PluginEvents, config: PluginConfigOptions) {
|
||||||
config,
|
config,
|
||||||
);
|
);
|
||||||
installLogsPrinter(on, {
|
installLogsPrinter(on, {
|
||||||
// printLogsToConsole: "always",
|
printLogsToConsole: "never",
|
||||||
|
|
||||||
|
// write logs to cypress/results/cypresslogs/<spec>.txt
|
||||||
|
outputRoot: "cypress/results",
|
||||||
|
outputTarget: {
|
||||||
|
"cypresslogs|txt": "txt",
|
||||||
|
},
|
||||||
|
|
||||||
|
// strip 'cypress/e2e' from log filenames
|
||||||
|
specRoot: "cypress/e2e",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue