Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
live-github-bot[bot] committed Nov 24, 2023
2 parents a184eea + aad92a2 commit 468bbdb
Show file tree
Hide file tree
Showing 836 changed files with 126,372 additions and 1,159,673 deletions.
45 changes: 26 additions & 19 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
<!--
Thank you for your contribution! 👍
Please make sure to read CONTRIBUTING.md if you have not already.
Disclaimer: Pull Requests that do not comply with the rules will be arbitrarily closed.
Please make sure to read CONTRIBUTING.md if you have not already. Pull Requests that do not comply with the rules will be arbitrarily closed.
-->

### 📝 Description

_Replace this text by a clear and concise description of what this pull request is about and why it is needed._
_Replace this text by a clear and concise description of what this pull request is about and why it is needed. Be sure to explain the problem you're addressing and the solution you're proposing._
_For libraries, you can add a code sample of how to use it._
_For bugfixes, you can explain the previous behavior and how it was fixed._
_In case of visual features, please attach screenshots or video recordings to demonstrate the changes._

<!--
| Before | After |
| ------------- | ------------- |
| | |
-->

### ❓ Context

- **Impacted projects**: `` <!-- Add the list of end user projects impacted by the change inside of the ` `, like so `LLM, LLD`. -->
- **Linked resource(s)**: [] <!-- Attach any ticket number if relevant inside the brackets, like so [LIVE-0000]. (JIRA / Github issue number) -->
- **JIRA or GitHub link**: <!-- Attach the relevant ticket number if applicable. (e.g., JIRA-123 or #123) -->

### ✅ Checklist

- [ ] **Test coverage** <!-- Are your changes covered by tests? Features must be tested, bugfixes must include a test that would have detected the issue. -->
- [ ] **Atomic delivery** <!-- Is this pull request standalone? In order words, does it depend on nothing else? Please explain if not checked. -->
- [ ] **No breaking changes** <!-- If there are breaking changes, please explain why. -->
Pull Requests must pass the CI and be code reviewed. Set as Draft if the PR is not ready.

### 📸 Demo

<!--
For visual features, please attach screenshots or video recordings to demonstrate the changes.
For libraries, you can add a code sample.
For bugfixes, you can drop this section.
-->
- [ ] `npx changeset` was attached.
- [ ] **Covered by automatic tests.** <!-- if not, please explain. (Feature must be tested / Bugfix must bring non-regression) -->
- [ ] **Impact of the changes:** <!-- Please take some time to list the impact & what specific areas Quality Assurance (QA) should focus on -->
-

### 🚀 Expectations to reach
---

_Please make sure you follow these [**Important Steps**](https://github.com/LedgerHQ/ledger-live/blob/develop/CONTRIBUTING.md#important-steps)._
### 🧐 Checklist for the PR Reviewers

_Pull Requests must pass the CI and be internally validated in order to be merged._
<!-- Please do not edit this if you are the PR author -->

<!-- If any of the expectations are not met please explain the reason in detail. -->
- [ ] **The code aligns with the requirements** described in the linked JIRA or GitHub issue.
- [ ] **The PR description clearly documents the changes** made and explains any technical trade-offs or design decisions.
- [ ] **There are no undocumented trade-offs**, technical debt, or maintainability issues.
- [ ] **The PR has been tested** thoroughly, and any potential edge cases have been considered and handled.
- [ ] **Any new dependencies** have been justified and documented.
- [ ] **Performance** considerations have been taken into account. (changes have been profiled or benchmarked if necessary)
56 changes: 56 additions & 0 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ on:
description: true if the PR is in draft
required: false
default: "false"
prNumber:
description: reference to the PR
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
Expand Down Expand Up @@ -56,11 +59,19 @@ jobs:
aws-secret-key: ${{ secrets.AWS_S3_CACHE_SECRET_KEY }}
- name: Build the app
run: pnpm build:lld --api="http://127.0.0.1:${{ steps.build-desktop.outputs.port }}" --token="yolo" --team="foo"
env:
GENERATE_METAFILES: 1
- name: Upload linux app
uses: actions/upload-artifact@v3
with:
name: ${{ steps.build-desktop.outputs.version }}-linux-x86_64.AppImage
path: ${{ github.workspace }}/apps/ledger-live-desktop/dist/${{ steps.build-desktop.outputs.name }}-${{ steps.build-desktop.outputs.version }}-linux-x86_64.AppImage
- name: Upload bundle metafiles
uses: actions/upload-artifact@v3
if: always()
with:
name: linux-js-bundle-metafiles
path: ${{ github.workspace }}/apps/ledger-live-desktop/metafile.*

build-desktop-app-windows:
name: "Build Ledger Live Desktop (Windows)"
Expand Down Expand Up @@ -92,11 +103,19 @@ jobs:
run: |
pnpm build:lld --api="http://127.0.0.1:${{ steps.build-desktop.outputs.port }}" --token="yolo" --team="foo"
shell: bash
env:
GENERATE_METAFILES: 1
- name: Upload windows
uses: actions/upload-artifact@v3
with:
name: ${{ steps.build-desktop.outputs.version }}-win-x64.exe
path: ${{ github.workspace }}/apps/ledger-live-desktop/dist/${{ steps.build-desktop.outputs.name }}-${{ steps.build-desktop.outputs.version }}-win-x64.exe
- name: Upload bundle metafiles
uses: actions/upload-artifact@v3
if: always()
with:
name: windows-js-bundle-metafiles
path: ${{ github.workspace }}/apps/ledger-live-desktop/metafile.*

build-desktop-app-macos:
name: "Build Ledger Live Desktop (Mac OS X)"
Expand Down Expand Up @@ -127,17 +146,54 @@ jobs:
- name: Build the app
run: |
pnpm build:lld --api="http://127.0.0.1:${{ steps.build-desktop.outputs.port }}" --token="yolo" --team="foo"
env:
GENERATE_METAFILES: 1
- name: Upload macOS app
uses: actions/upload-artifact@v3
with:
name: ${{ steps.build-desktop.outputs.version }}-mac.dmg
path: ${{ github.workspace }}/apps/ledger-live-desktop/dist/${{ steps.build-desktop.outputs.name }}-${{ steps.build-desktop.outputs.version }}-mac.dmg
- name: Upload bundle metafiles
uses: actions/upload-artifact@v3
if: always()
with:
name: mac-js-bundle-metafiles
path: ${{ github.workspace }}/apps/ledger-live-desktop/metafile.*

report:
needs: [build-desktop-app-linux, build-desktop-app-macos, build-desktop-app-windows]
runs-on: ubuntu-latest
if: always() && !cancelled() && github.event_name == 'workflow_dispatch'
steps:
- uses: LedgerHQ/ledger-live/tools/actions/composites/checkout-merge@develop
with:
ref: ${{ (github.event_name == 'workflow_dispatch' && (inputs.ref || github.ref_name)) || github.sha }}
base: ${{ inputs.base_ref }}
persist-credentials: false
- name: generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.GH_BOT_APP_ID }}
private_key: ${{ secrets.GH_BOT_PRIVATE_KEY }}
- uses: actions/download-artifact@v3
with:
name: linux-js-bundle-metafiles
path: linux-js-bundle-metafiles
- uses: actions/download-artifact@v3
with:
name: windows-js-bundle-metafiles
path: windows-js-bundle-metafiles
- uses: actions/download-artifact@v3
with:
name: mac-js-bundle-metafiles
path: mac-js-bundle-metafiles
- uses: ./tools/actions/desktop-build-checks
if: inputs.prNumber != ''
with:
token: ${{ steps.generate-token.outputs.token }}
baseBranch: ${{ inputs.base_ref || 'develop' }}
prNumber: ${{ inputs.prNumber }}
- uses: actions/github-script@v6
name: build summary
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
aws-access-key: ${{ secrets.AWS_S3_CACHE_ACCESS_KEY }}
aws-secret-key: ${{ secrets.AWS_S3_CACHE_SECRET_KEY }}
- name: Run unit tests
run: pnpm desktop test:jest
run: pnpm desktop test:jest:coverage

e2e-tests-windows:
name: "Desktop E2E (Windows)"
Expand Down
46 changes: 37 additions & 9 deletions .github/workflows/test-mobile-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Create iOS simulator
id: simulator
run: |
ID=$(xcrun simctl create "iPhone 13" "iPhone 13")
ID=$(xcrun simctl create "iPhone 14" "iPhone 14")
echo "id=$ID" >> $GITHUB_OUTPUT
- name: Build iOS app for Detox test run
if: steps.detox-build.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -210,25 +210,53 @@ jobs:
- name: Build Android app for Detox test run
run: |
pnpm mobile e2e:build -c android.emu.release
- name: cache android emulator
uses: tespkg/actions-cache@v1
id: detox-avd
with:
path: |
~/.android/avd/*
~/.android/adb*
key: ${{ runner.os }}-detox-avd-${{ hashFiles('~/.android/avd/*/config.ini') }}
restore-keys: |
${{ runner.os }}-detox-avd-
accessKey: ${{ secrets.AWS_S3_CACHE_ACCESS_KEY }}
secretKey: ${{ secrets.AWS_S3_CACHE_SECRET_KEY }}
bucket: ll-gha-s3-cache
region: eu-west-1
use-fallback: false
- name: create AVD and generate snapshot for caching
if: steps.detox-avd.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 32
arch: x86_64
profile: pixel_6_pro
target: google_apis
avd-name: "Pixel_6_Pro_API_32"
force-avd-creation: true
cores: 4
ram-size: 8192M
disable-linux-hw-accel: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: ./tools/scripts/wait_emulator_idle.sh
- name: Start Emulator and Run Android Tests
id: detox
uses: reactivecircus/android-emulator-runner@v2
timeout-minutes: 60
env:
DETOX_INSTALL_TIMEOUT: 120000
with:
api-level: 31
api-level: 32
arch: x86_64
profile: pixel_5
profile: pixel_6_pro
target: google_apis
avd-name: "Pixel_5_API_31"
force-avd-creation: true
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
avd-name: "Pixel_6_Pro_API_32"
force-avd-creation: false
cores: 4
ram-size: 4096M
heap-size: 512M
disk-size: 4096M
ram-size: 8192M
disable-linux-hw-accel: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: pnpm mobile e2e:test -c android.emu.release --loglevel error --record-logs all --take-screenshots all --forceExit --detectOpenHandles --headless --retries 1
- name: Upload test artifacts
if: always()
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/test-release-create.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: "[Import CAL Tokens test Release] Create Branch"
on:
workflow_dispatch:
inputs:
ref:
description: Use workflow from branch
required: false

jobs:
create-test-release:
name: Create test Release
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max-old-space-size=7168"
RELEASE_BRANCH: "import-cal-token-test-release"
steps:
- name: generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.GH_BOT_APP_ID }}
private_key: ${{ secrets.GH_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v3
if: ${{ inputs.ref != null }}
with:
ref: ${{ inputs.ref }}
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- uses: actions/checkout@v3
if: ${{ !inputs.ref }}
with:
ref: develop
token: ${{ steps.generate-token.outputs.token }}
- name: set git user
run: |
git config user.email "105061298+live-github-bot[bot]@users.noreply.github.com"
git config user.name "live-github-bot[bot]"
- name: create test release release branch
run: |
git checkout -b $RELEASE_BRANCH
- name: Setup the toolchain
uses: ./tools/actions/composites/setup-toolchain
- name: install dependencies
run: pnpm i -F "ledger-live"
- name: import CAL tokens
run: pnpm import:cal-tokens
- name: commit new tokens
run: |
git add .
git commit -m 'chore(prerelease) update cryptoassets'
- name: update cryptoassets.md
run: |
pnpm generate:cryptoassets-md
git add .
git commit -m 'update cryptoassets.md'
- name: update sortByMarketcap snapshot
run: |
pnpm common jest --runTestsByPath src/currencies/sortByMarketcap.test.ts -u
git add .
git commit -m 'update sortByMarketcap snapshot'
- name: enter prerelease mode
run: pnpm changeset pre enter next
- name: commit
run: |
git add .
git commit -m "chore(prerelease): :rocket: entering prerelease mode"
- name: Get date
id: date
run: |
echo "date=$(date +%F)" >> $GITHUB_OUTPUT
- name: push
run: |
git push origin release
gh pr create --title ":rocket: Release ${{ steps.date.outputs.date }}" -F .github/templates/release.md --base main --head release
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}

3 changes: 3 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ function readPackage(pkg, context) {
"@ethersproject/strings": "*",
"@ethersproject/logger": "*",
}),
addDependencies("casper-js-sdk", {
"@noble/curves": "*",
}),
],
pkg,
context,
Expand Down
2 changes: 1 addition & 1 deletion .prototools
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node = "18.18.0"
npm = "9.8.1"
pnpm = "8.8.0"
pnpm = "8.10.2"
Loading

3 comments on commit 468bbdb

@vercel
Copy link

@vercel vercel bot commented on 468bbdb Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ledger-live-docs – ./docs

ledger-live-docs.vercel.app
ledger-live-docs-git-main-ledgerhq.vercel.app
ledger-live-docs-ledgerhq.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 468bbdb Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 468bbdb Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.