-
Notifications
You must be signed in to change notification settings - Fork 39
47 lines (42 loc) · 1.25 KB
/
e2e-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: E2E Tests
on:
workflow_call:
inputs:
skipNxCache:
type: boolean
default: false
required: false
description: Skip the nx cache
secrets:
NX_CLOUD_ACCESS_TOKEN:
required: false
description: Token to use Nx Cloud token
env:
NX_SKIP_NX_CACHE: ${{ inputs.skipNxCache }}
YARN_ENABLE_HARDENED_MODE: 0
permissions:
contents: read
jobs:
e2e-tests:
runs-on: ubuntu-latest
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./tools/github-actions/download-build-output
- uses: ./tools/github-actions/setup
- run: yarn playwright install
- name: Run e2e tests
run: |
npx --yes http-server apps/showcase/dist/browser -p 8080 -s &
npx --yes wait-on $PLAYWRIGHT_TARGET_URL -t 5000
yarn test-e2e
shell: bash
env:
PLAYWRIGHT_TARGET_URL: http://127.0.0.1:8080
- name: Publish tests reports
if: failure()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: e2e-report
path: apps/showcase/playwright-reports