-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 1.37 KB
/
e2e_client.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
48
49
50
51
52
name: Client E2E tests
on:
workflow_dispatch:
push:
paths:
- 'client/**'
- '.github/workflows/e2e-client.yml'
- '!client/README.md'
jobs:
e2e_client:
name: Client E2E tests
timeout-minutes: 15
runs-on: ubuntu-22.04
defaults:
run:
working-directory: client
steps:
- name: checkout pull
uses: actions/checkout@v4
- name: Node setup
uses: actions/setup-node@v3
with:
node-version-file: 'client/.nvmrc'
cache: yarn
cache-dependency-path: 'client/yarn.lock'
- name: Changes Yarn version
run: corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run Playwright tests
run: yarn playwright test
env:
NEXT_PUBLIC_URL: http://localhost:3000
NEXT_PUBLIC_API_URL: http://localhost:1337/cms
NEXT_PUBLIC_MAPBOX_API_TOKEN: ${{ secrets.NEXT_PUBLIC_MAPBOX_API_TOKEN }}
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30