Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: 📊 E2E Tests

on:
workflow_dispatch:
pull_request:

jobs:
e2e:
Expand Down Expand Up @@ -32,6 +33,7 @@ jobs:
working-directory: test/e2e

- name: Run E2E tests
id: run-e2e-tests
uses: GabrielBB/xvfb-action@v1
with:
run: pnpm test:e2e
Expand All @@ -43,25 +45,25 @@ jobs:
CI: true

- name: Generate Allure report
if: always()
if: failure() && steps.run-e2e-tests.outcome == 'failure'
run: pnpm exec allure generate allure-results -o allure-report --clean
working-directory: test/e2e

- name: Upload Allure report
if: always()
if: failure() && steps.run-e2e-tests.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: allure-report-${{ github.run_number }}
path: test/e2e/allure-report
retention-days: 30

- name: Set timestamp.
if: always()
if: failure() && steps.run-e2e-tests.outcome == 'failure'
id: timestamp
run: echo "TIMESTAMP=$(date +%Y%m%d_%H%M%S_%3N)" >> $GITHUB_ENV

- name: Generate GitHub App token.
if: always()
if: failure() && steps.run-e2e-tests.outcome == 'failure'
id: app-token
uses: actions/create-github-app-token@v1
with:
Expand All @@ -78,7 +80,7 @@ jobs:
# 4. Add secrets to this repo (Settings → Secrets → Actions): APP_ID and APP_PRIVATE_KEY (.pem contents)
# 5. The token is generated above via actions/create-github-app-token using those secrets.
- name: Pushes to reports repository.
if: always()
if: failure() && steps.run-e2e-tests.outcome == 'failure'
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ steps.app-token.outputs.token }}
Expand All @@ -91,5 +93,5 @@ jobs:
target-directory: 'allure-report_ts_${{ env.TIMESTAMP }}'

- name: Write URL in summary.
if: always()
if: failure() && steps.run-e2e-tests.outcome == 'failure'
run: echo "### Test results https://jubilant-broccoli-www5lem.pages.github.io/allure-report_ts_${{ env.TIMESTAMP }}" >> $GITHUB_STEP_SUMMARY
Loading