ci(ws): archive frontend cypress test results in github actions (#396)
Signed-off-by: Jiri Daněk <jdanek@redhat.com>
This commit is contained in:
parent
fcb5fc5272
commit
5690c2ee52
|
|
@ -42,8 +42,34 @@ jobs:
|
|||
|
||||
- name: Run tests
|
||||
working-directory: workspaces/frontend
|
||||
# use id to skip archiving artifacts if running the tests was skipped, usually due to failure in steps above
|
||||
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#steps-context
|
||||
id: run-tests
|
||||
run: npm run test
|
||||
|
||||
- name: Upload Cypress test report
|
||||
uses: actions/upload-artifact@v4
|
||||
if: "!cancelled() && steps.run-tests.outcome != 'skipped'"
|
||||
with:
|
||||
name: cypress-report
|
||||
path: |
|
||||
workspaces/frontend/src/__tests__/cypress/results/mocked/index.html
|
||||
workspaces/frontend/src/__tests__/cypress/results/mocked/junit-report.xml
|
||||
|
||||
- name: Upload Cypress screenshots (on failure)
|
||||
uses: actions/upload-artifact@v4
|
||||
if: "failure() && steps.run-tests.outcome == 'failure'"
|
||||
with:
|
||||
name: cypress-screenshots
|
||||
path: workspaces/frontend/src/__tests__/cypress/results/mocked/screenshots
|
||||
|
||||
- name: Upload Cypress video recordings (on failure)
|
||||
uses: actions/upload-artifact@v4
|
||||
if: "failure() && steps.run-tests.outcome == 'failure'"
|
||||
with:
|
||||
name: cypress-videos
|
||||
path: workspaces/frontend/src/__tests__/cypress/results/mocked/videos
|
||||
|
||||
- name: Check if there are uncommitted file changes
|
||||
working-directory: workspaces/frontend
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Reference in New Issue