-
-
Notifications
You must be signed in to change notification settings - Fork 71
65 lines (55 loc) · 1.74 KB
/
ci-test-e2e.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
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI - App Client E2E
on:
pull_request:
push:
branches:
- main
jobs:
run-e2es:
name: CI - App Client E2E
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
working-directory: packages/app-client
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22
corepack: true
cache: 'pnpm'
- name: Get Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(pnpm list --json | jq -r .[0].devDependencies.\"@playwright/test\".version)" >> "$GITHUB_OUTPUT"
- name: Install dependencies
run: pnpm i
working-directory: ./
- name: Build iso-prod app
run: |
pnpm -F @enclosed/app-client build
pnpm -F @enclosed/app-server build:node
mkdir dist-app
cp -r dist dist-app/public
cp -r ../app-server/dist-node/index.cjs dist-app/index.cjs
- name: Restore Playwright browsers from cache
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}-${{ hashFiles('**/playwright.config.ts') }}
restore-keys: |
${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}-
${{ runner.os }}-playwright-
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run e2e tests
run: pnpm test:e2e
env:
USE_PREVIEW_SERVER: true
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 15