Upload cypress screenshots folder as an artifact if the tests failed with an error. (#2934)

* added upload cypress screenshots if a tests failed.

* Replace command to run cypress tests in publish_docker_images.yml
main
Dmitry Kruchinin 5 years ago committed by GitHub
parent 9f7d18150d
commit ca97507211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,6 +38,12 @@ jobs:
cd ./tests
npm ci
npx cypress run --headless --browser chrome
- name: Uploading cypress screenshots as an artifact
if: failure()
uses: actions/upload-artifact@v2
with:
name: cypress_screenshots
path: ${{ github.workspace }}/tests/cypress/screenshots
- name: Collect coverage data
env:
HOST_COVERAGE_DATA_DIR: ${{ github.workspace }}

@ -33,7 +33,14 @@ jobs:
run: |
cd ./tests
npm ci
npx cypress run --headless --browser chrome
npm run cypress:run:chrome
- name: Uploading cypress screenshots as an artifact
if: failure()
uses: actions/upload-artifact@v2
with:
name: cypress_screenshots
path: ${{ github.workspace }}/tests/cypress/screenshots
- name: Login to Docker Hub
uses: docker/login-action@v1
with:

@ -26,3 +26,9 @@ jobs:
cd ./tests
npm ci
npm run cypress:run:firefox
- name: Uploading cypress screenshots as an artifact
if: failure()
uses: actions/upload-artifact@v2
with:
name: cypress_screenshots
path: ${{ github.workspace }}/tests/cypress/screenshots

Loading…
Cancel
Save