mirror of
https://github.com/IT4Change/boilerplate-e2e-cypress-cucumber.git
synced 2025-12-13 04:55:50 +00:00
34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
name: e2e:run:tests
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
e2e-tests:
|
|
name: Run all E2E tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@master
|
|
|
|
- name: E2E - Run all tests
|
|
id: e2e-run
|
|
uses: cypress-io/github-action@v6
|
|
|
|
- name: E2E | if tests failed, compile html report
|
|
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
|
|
run: |
|
|
cd cypress/
|
|
npx tsx create-cucumber-html-report.ts
|
|
|
|
- name: Get PR number
|
|
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
|
|
uses: jwalton/gh-find-current-pr@master
|
|
id: pr-number
|
|
|
|
- name: E2E | if tests failed, upload report
|
|
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: boilerplate-e2e-test-report-pr-${{ steps.pr-number.outputs.pr }}
|
|
path: /home/runner/work/boilerplate-e2e-cypress-cucumber/boilerplate-e2e-cypress-cucumber/cypress/reports/e2e_html_report
|