Skip to content

Commit

Permalink
test: Publish cypress screenshots only if exists (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Sep 21, 2020
1 parent 76e8f93 commit 5357beb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,18 @@ steps:
- script: yarn test:wpt:browser
displayName: "Run wpt tests in browser"

- bash: |
if [ -d tests/cypress/screenshots ]; then
echo "##vso[task.setVariable variable=CY_SCREENSHOTS_EXIST]true"
else
echo "##vso[task.setVariable variable=CY_SCREENSHOTS_EXIST]false"
fi
condition: always()
displayName: Check if cypress screenshots were created
- publish: tests/cypress/screenshots
artifact: browser-test-screenshots-node-$(node_version)
condition: failed()
condition: and(failed(), eq(variables.CY_SCREENSHOTS_EXIST, 'true'))
displayName: "Publish cypress screenshots"

- publish: tests/cypress/videos
Expand Down

0 comments on commit 5357beb

Please sign in to comment.