ci: Upload puppeteer artifacts on failure.

Storing the puppeteer artifacts is useful for debugging failures in
CI.

Confusingly, `if: ${{ something }}` does not work out to be true like
`if: ${{ always() && something }}` does; the former has a silent
`success()` built into it[1]:

> If your if expression does not contain any of the status functions
> it will automatically result with success().

[1] https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions
This commit is contained in:
Alex Vandiver 2021-03-08 13:50:44 -08:00 committed by Tim Abbott
parent 0a09c9dfd7
commit 2dc0662a50
1 changed files with 2 additions and 1 deletions

View File

@ -143,7 +143,8 @@ jobs:
pip install codecov && codecov || echo "Error in uploading coverage reports to codecov.io."
- name: Store Puppeteer artifacts
if: ${{ matrix.include_frontend_tests }}
# Upload these on failure, as well
if: ${{ always() && matrix.include_frontend_tests }}
uses: actions/upload-artifact@v2
with:
name: puppeteer