-
Notifications
You must be signed in to change notification settings - Fork 291
/
action.yml
65 lines (64 loc) · 2.37 KB
/
action.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: "Test Ledger Live Desktop"
description: "Composite job to run Ledger Live Desktop tests"
inputs:
os:
description: "name of the os <macos | linux | windows>"
required: true
turbo-server-port:
description: "port on which the turborepo local cache server is running"
required: true
runs:
using: "composite"
steps:
- name: Install dependencies
run: pnpm i --filter="ledger-live-desktop..." --filter="ledger-live" --frozen-lockfile --unsafe-perm
shell: bash
- name: Install playwright dependencies
run: npx playwright@1.27.1 install --with-deps chromium
shell: bash
- name: Build dependencies
env:
GOGC: 75
run: |
pnpm build:lld:deps --api="http://127.0.0.1:${{ inputs.turbo-server-port }}" --token="yolo" --team="foo"
pnpm desktop build:testing
shell: bash
- name: Build Dummy SDK app for testing
run: pnpm --filter="dummy-live-app" i && pnpm --filter="dummy-live-app" build
shell: bash
- name: Run unit tests [Linux]
if: inputs.os == 'linux'
run: pnpm desktop test:jest
shell: bash
- name: Run playwright tests [Linux => xvfb-run]
if: inputs.os == 'linux'
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm desktop test:playwright
shell: bash
- name: Run playwright tests
if: inputs.os != 'linux'
run: pnpm desktop test:playwright
shell: bash
- name: upload diffs to imgur
if: always() && !cancelled()
uses: ledgerhq/ledger-live/tools/actions/upload-images@develop
id: imgur
with:
path: apps/ledger-live-desktop/tests/artifacts/test-results
workspace: ${{ github.workspace }}
os: ${{ inputs.os }}
- name: upload ci suggested screenshots
if: always() && !cancelled()
uses: actions/upload-artifact@v3
with:
name: images
path: images-${{ inputs.os }}.json
- name: Upload playwright test results [On Failure]
uses: actions/upload-artifact@v3
if: failure() && !cancelled()
with:
name: ${{ format('playwright-results-{0}', inputs.os) }}
path: |
apps/ledger-live-desktop/tests/artifacts/test-results
apps/ledger-live-desktop/tests/artifacts/html-report
apps/ledger-live-desktop/tests/artifacts/coverage
apps/ledger-live-desktop/tests/artifacts/videos