forked from LedgerHQ/ledger-live
-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (76 loc) · 2.36 KB
/
test-integration.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: "[Test] Integration"
on:
schedule:
- cron: 20 9 * * *
workflow_dispatch:
inputs:
ref:
description: "Which ref (branch or tag) to pull from ?"
required: false
default: develop
filter:
description: "passed to a jest test name filtering"
required: false
default: ""
permissions:
id-token: write
contents: read
jobs:
integration-tests:
name: "Integration Tests"
env:
NODE_OPTIONS: "--max-old-space-size=7168"
FORCE_COLOR: 3
CI_OS: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.sha }}
fetch-depth: 0
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
id: toolchain
with:
skip-turbo-cache: "false"
upgrade_npm: ${{ matrix.os == 'windows-latest' }}
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
region: ${{ secrets.AWS_CACHE_REGION }}
turbo-server-token: ${{ secrets.TURBOREPO_SERVER_TOKEN }}
- name: Install node-gyp globally
if: runner.os == 'Windows'
run: |
pnpm add -g node-gyp
- name: Install dependencies
run: pnpm i --filter="live-common..." --filter="ledger-live"
- name: Build
run: pnpm build:llc --api="http://127.0.0.1:${{ steps.toolchain.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
- name: Test
shell: bash
env:
FILTER: ${{ inputs.filter }}
VERBOSE_FILE: logs.txt
run: |
pnpm common ci-test-integration $FILTER
git diff --exit-code libs/ledger-live-common/src
- name: (On Failure) Upload live-common snapshots and source
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ format('live-common-src-{0}', matrix.os) }}
path: |
libs/ledger-live-common/src
- name: (On Failure) Upload logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: logs.txt
path: logs.txt