Skip to content

Commit

Permalink
Upload cypress screenshots folder as an artifact if the tests failed …
Browse files Browse the repository at this point in the history
…with an error. (#2934)

* added upload cypress screenshots if a tests failed.

* Replace command to run cypress tests in publish_docker_images.yml
  • Loading branch information
dvkruchinin authored Mar 10, 2021
1 parent 9f7d181 commit ca97507
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/publish_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ca97507

Please sign in to comment.