Skip to content

Commit 518c336

Browse files
Merge branch 'release'
2 parents 30ded88 + 7961cdd commit 518c336

File tree

3,362 files changed

+42142
-61981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,362 files changed

+42142
-61981
lines changed

.eslintrc.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
},
6+
parser: "@typescript-eslint/parser",
7+
plugins: ["@typescript-eslint", "prettier", "json"],
8+
extends: [
9+
"eslint:recommended",
10+
"plugin:prettier/recommended",
11+
"plugin:json/recommended",
12+
"plugin:@typescript-eslint/eslint-recommended",
13+
"plugin:@typescript-eslint/recommended",
14+
],
15+
rules: {
16+
"prettier/prettier": "error",
17+
"no-inner-declarations": "off",
18+
// Enables no-unused-vars only from TypeScript
19+
"no-unused-vars": "off",
20+
"@typescript-eslint/no-unused-vars": [
21+
"error",
22+
{
23+
argsIgnorePattern: "^_",
24+
destructuredArrayIgnorePattern: "^_",
25+
vars: "all",
26+
args: "after-used",
27+
ignoreRestSiblings: true,
28+
},
29+
],
30+
},
31+
};

.github/workflows/build-desktop-external.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212
required: true
1313
base_ref:
1414
description: The base branch to merge the head into when checking out the code
15+
required: false
16+
draft:
17+
description: true if the PR is in draft
18+
required: false
19+
default: "false"
1520

1621
concurrency:
1722
# See: https://github.com/orgs/community/discussions/35341

.github/workflows/build-desktop.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
required: true
1919
base_ref:
2020
description: The base branch to merge the head into when checking out the code
21+
required: false
22+
draft:
23+
description: true if the PR is in draft
24+
required: false
25+
default: "false"
2126

2227
concurrency:
2328
# See: https://github.com/orgs/community/discussions/35341

.github/workflows/build-mobile-external.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
required: true
1313
base_ref:
1414
description: The base branch to merge the head into when checking out the code
15+
required: false
1516

1617
concurrency:
1718
# See: https://github.com/orgs/community/discussions/35341
@@ -28,7 +29,7 @@ jobs:
2829
- uses: LedgerHQ/ledger-live/tools/actions/composites/checkout-merge@develop
2930
with:
3031
ref: ${{ github.ref_name }}
31-
base_ref: ${{ inputs.base_ref }}
32+
base: ${{ inputs.base_ref }}
3233
- name: set git user
3334
run: |
3435
git config user.email "105061298+live-github-bot[bot]@users.noreply.github.com"
@@ -97,7 +98,7 @@ jobs:
9798
- uses: LedgerHQ/ledger-live/tools/actions/composites/checkout-merge@develop
9899
with:
99100
ref: ${{ github.ref_name }}
100-
base_ref: ${{ inputs.base_ref }}
101+
base: ${{ inputs.base_ref }}
101102
- name: set git user
102103
run: |
103104
git config user.email "105061298+live-github-bot[bot]@users.noreply.github.com"

.github/workflows/build-mobile.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
required: true
1919
base_ref:
2020
description: The base branch to merge the head into when checking out the code
21+
required: false
2122

2223
concurrency:
2324
# See: https://github.com/orgs/community/discussions/35341

.github/workflows/test-desktop-external.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212
required: true
1313
base_ref:
1414
description: The base branch to merge the head into when checking out the code
15+
required: false
16+
draft:
17+
description: true if the PR is in draft
18+
required: false
19+
default: "false"
1520

1621
concurrency:
1722
# See: https://github.com/orgs/community/discussions/35341
@@ -82,7 +87,12 @@ jobs:
8287
install_playwright: true
8388
- name: Run playwright tests [Linux => xvfb-run]
8489
id: tests
85-
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm desktop test:playwright
90+
run: |
91+
if [[ "${{ inputs.draft }}" == true ]]; then
92+
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm desktop test:playwright
93+
else
94+
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm desktop test:playwright
95+
fi
8696
- name: upload diffs to imgur
8797
if: always() && !cancelled()
8898
uses: ./tools/actions/upload-images
@@ -140,7 +150,12 @@ jobs:
140150
install_playwright: true
141151
- name: Run playwright tests
142152
id: tests
143-
run: pnpm desktop test:playwright
153+
run: |
154+
if [[ "${{ inputs.draft }}" == true ]]; then
155+
pnpm desktop test:playwright
156+
else
157+
pnpm desktop test:playwright
158+
fi
144159
- name: upload diffs to imgur
145160
if: always() && !cancelled()
146161
uses: ./tools/actions/upload-images
@@ -198,7 +213,13 @@ jobs:
198213
upgrade_npm: true
199214
- name: Run playwright tests
200215
id: tests
201-
run: pnpm desktop test:playwright
216+
run: |
217+
if [[ "${{ inputs.draft }}" == true ]]; then
218+
pnpm desktop test:playwright
219+
else
220+
pnpm desktop test:playwright
221+
fi
222+
shell: bash
202223
- name: upload diffs to imgur
203224
if: always() && !cancelled()
204225
uses: ./tools/actions/upload-images

.github/workflows/test-desktop.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
required: true
1919
base_ref:
2020
description: The base branch to merge the head into when checking out the code
21+
required: false
22+
draft:
23+
description: true if the PR is in draft
24+
required: false
25+
default: "false"
2126

2227
concurrency:
2328
# See: https://github.com/orgs/community/discussions/35341
@@ -109,7 +114,13 @@ jobs:
109114
upgrade_npm: true
110115
- name: Run playwright tests
111116
id: tests
112-
run: pnpm desktop test:playwright
117+
run: |
118+
if [[ "${{ inputs.draft }}" == true ]]; then
119+
pnpm desktop test:playwright
120+
else
121+
pnpm desktop test:playwright
122+
fi
123+
shell: bash
113124
- name: upload diffs to imgur
114125
if: always() && !cancelled()
115126
uses: ./tools/actions/upload-images
@@ -174,7 +185,12 @@ jobs:
174185
install_playwright: true
175186
- name: Run playwright tests [Linux => xvfb-run]
176187
id: tests
177-
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm desktop test:playwright
188+
run: |
189+
if [[ "${{ inputs.draft }}" == true ]]; then
190+
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm desktop test:playwright
191+
else
192+
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm desktop test:playwright
193+
fi
178194
- name: upload diffs to imgur
179195
if: always() && !cancelled()
180196
uses: ./tools/actions/upload-images
@@ -239,7 +255,12 @@ jobs:
239255
pnpm_dest: ${{ runner.temp }}/setup-pnpm
240256
- name: Run playwright tests
241257
id: tests
242-
run: pnpm desktop test:playwright
258+
run: |
259+
if [[ "${{ inputs.draft }}" == true ]]; then
260+
pnpm desktop test:playwright
261+
else
262+
pnpm desktop test:playwright
263+
fi
243264
- name: upload diffs to imgur
244265
if: always() && !cancelled()
245266
uses: ./tools/actions/upload-images

.github/workflows/test-mobile-e2e.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
required: true
1919
base_ref:
2020
description: The base branch to merge the head into when checking out the code
21+
required: false
2122

2223
# Uncomment to have log-level: trace on detox run and build
2324
# (cf: apps/ledger-live-mobile/detox.config.js)

.github/workflows/test-mobile.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
required: true
1919
base_ref:
2020
description: The base branch to merge the head into when checking out the code
21+
required: false
2122

2223
concurrency:
2324
# See: https://github.com/orgs/community/discussions/35341
@@ -52,8 +53,7 @@ jobs:
5253
- name: Run linter
5354
run: |
5455
pnpm lint --filter="live-mobile" --api="http://127.0.0.1:${{ steps.turborepo-cache-server.outputs.port }}" --token="yolo" --team="foo" -- --format="json" -o="lint.json"
55-
cd apps/ledger-live-mobile
56-
node -p "require('./node_modules/eslint/lib/cli-engine/formatters/stylish.js')(require('./lint.json'))"
56+
node -p "require('./node_modules/eslint/lib/cli-engine/formatters/stylish.js')(require('./apps/ledger-live-mobile/lint.json'))"
5757
- name: check for dead code
5858
run: cd apps/ledger-live-mobile && npx unimported
5959
shell: bash

.github/workflows/test.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,27 @@ jobs:
4949
echo "diff=$diff" >> $GITHUB_OUTPUT
5050
exit $diff
5151
52+
53+
test-common-tools:
54+
name: "Test common-tools"
55+
env:
56+
NODE_OPTIONS: "--max-old-space-size=7168"
57+
FORCE_COLOR: 3
58+
outputs:
59+
fail: ${{ steps.diff.outputs.diff }}
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: LedgerHQ/ledger-live/tools/actions/composites/checkout-merge@develop
63+
with:
64+
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || github.sha }}
65+
base: ${{ inputs.since_branch }}
66+
- name: Setup the toolchain
67+
uses: ./tools/actions/composites/setup-toolchain
68+
- name: Install dependencies
69+
run: pnpm i -F "live-common-tools..." -F "ledger-live"
70+
- name: build common-tools
71+
run: pnpm turbo run build --filter="live-common-tools"
72+
5273
test-cli:
5374
name: "Test CLI"
5475
env:
@@ -154,7 +175,7 @@ jobs:
154175
path: ${{ github.workspace }}/summary-${{ matrix.os }}.txt
155176

156177
report:
157-
needs: [test-cli, test-docs, test-libraries]
178+
needs: [test-cli, test-docs, test-libraries, test-common-tools]
158179
if: always() && !cancelled() && github.event_name == 'workflow_dispatch'
159180
runs-on: ubuntu-latest
160181
steps:

0 commit comments

Comments
 (0)