diff --git a/jobs/templates/swh-cypress.groovy b/jobs/templates/swh-cypress.groovy --- a/jobs/templates/swh-cypress.groovy +++ b/jobs/templates/swh-cypress.groovy @@ -37,7 +37,7 @@ source ~/swh-web-env/bin/activate pip3 install wheel pip3 install -e .[testing] - yarn install && yarn build-dev && yarn run cypress install + yarn install && yarn build-test && yarn run cypress install ''' }} }} @@ -52,6 +52,7 @@ python3 swh/web/manage.py runserver --nostatic --settings=swh.web.settings.tests & wait-for-it localhost:5004 yarn run cypress run + yarn run mochawesome ''' }} }} @@ -77,7 +78,23 @@ ''' }} }} + publishHTML (target: [ + allowMissing: true, + alwaysLinkToLastBuild: false, + keepAll: true, + reportDir: 'cypress/mochawesome/report', + reportFiles: 'mochawesome.html', + reportName: "Mochawesome Tests Report" + ]) + publishHTML (target: [ + allowMissing: true, + alwaysLinkToLastBuild: false, + keepAll: true, + reportDir: 'cypress/coverage/lcov-report', + reportFiles: 'index.html', + reportName: "Istanbul Code Coverage" + ]) }} }} }} \ No newline at end of file diff --git a/jobs/templates/swh-cypress.yaml b/jobs/templates/swh-cypress.yaml --- a/jobs/templates/swh-cypress.yaml +++ b/jobs/templates/swh-cypress.yaml @@ -62,13 +62,14 @@ source ~/swh-web-env/bin/activate pip3 install wheel pip3 install -e .[testing] - yarn install && yarn build-dev && yarn run cypress install + yarn install && yarn build-test && yarn run cypress install export PYTHONPATH=$PWD python3 swh/web/manage.py migrate python3 swh/web/manage.py createcachetable python3 swh/web/manage.py runserver --nostatic --settings=swh.web.settings.tests & wait-for-it localhost:5004 yarn run cypress run + yarn run mochawesome publishers: - phabricator: @@ -78,3 +79,17 @@ process-lint: true lint-file: .phabricator-lint lint-file-size: 1000000 + - html-publisher: + name: 'Mochawesome Tests Report' + dir: 'cypress/mochawesome/report' + files: 'mochawesome.html' + keep-all: true + allow-missing: true + link-to-last-build: false + - html-publisher: + name: 'Istanbul Code Coverage' + dir: 'cypress/coverage/lcov-report' + files: 'index.html' + keep-all: true + allow-missing: true + link-to-last-build: false