Skip to content

Commit

Permalink
Merging newest changes from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasFlamel1 committed Jul 26, 2024
2 parents e22b42f + afbcfcd commit 37f6c3d
Show file tree
Hide file tree
Showing 5,793 changed files with 634,771 additions and 414,275 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ module.exports = {
"no-inner-declarations": "off",
// Enables no-unused-vars only from TypeScript
"no-unused-vars": "off",
"no-restricted-imports": [
2,
{
paths: [
"lodash", // you must use the lodash/fp module import style to avoid importing the entire library
],
},
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": [
"error",
{
Expand Down
29 changes: 15 additions & 14 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ Thank you for your contribution! 👍
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.
-->

### ✅ Checklist

<!-- Pull Requests must pass the CI and be code reviewed. Set as Draft if the PR is not ready. -->

- [ ] `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 -->
- ...

### 📝 Description

_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._
Expand All @@ -20,24 +29,16 @@ _In case of visual features, please attach screenshots or video recordings to de

- **JIRA or GitHub link**: <!-- Attach the relevant ticket number if applicable. (e.g., [JIRA-123] for Jira or #123 for a Github issue) -->

### ✅ Checklist

Pull Requests must pass the CI and be code reviewed. Set as Draft if the PR is not ready.

- [ ] `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 -->
-

---

### 🧐 Checklist for the PR Reviewers

<!-- Please do not edit this if you are the PR author -->

- [ ] **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)
- **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)
4 changes: 2 additions & 2 deletions .github/workflow-templates/bot-coin-family.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:

jobs:
run-bot:
runs-on: [ledger-live-medium-linux]
runs-on: [ledger-live-medium]
steps:
- name: generate token
id: generate-token
Expand All @@ -25,7 +25,7 @@ jobs:
repository: LedgerHQ/coin-apps
token: ${{ steps.generate-token.outputs.token }}
path: coin-apps
- uses: ./tools/actions/composites/bot
- uses: LedgerHQ/ledger-live/tools/actions/composites/bot@develop
id: bot
timeout-minutes: 120
with:
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/account-migration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "Account migration test"

on:
workflow_dispatch:
inputs:
currencies:
description: "Currency to run the migration test on. If not specified the test will be run on all supported currencies. If specififed currencies should be comma seperated"
required: false
ref:
description: "The reference branch where the migration is made from. Will be develop by default"
required: false
default: "develop"

jobs:
account_migration:
name: "account-migration"
runs-on: ubuntu-latest
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@v4
with:
ref: ${{ github.base_ref || inputs.ref }}
token: ${{ steps.generate-token.outputs.token }}

- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop

- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop

- name: install dependencies and build
run: |
pnpm i --filter="!./apps/**"
pnpm build:llc
- name: Generate target output filename
id: target-output-file
# we get TARGET_SYNC_FILE_BASENAME from the same command later run in account-migration.ts to get the same basename
run: |
TARGET_SYNC_FILE_BASENAME=$(git rev-parse --short HEAD)
echo "TARGET_SYNC_FILE_BASENAME=$(echo ${TARGET_SYNC_FILE_BASENAME})" >> $GITHUB_OUTPUT
- name: Run synchronisation on target branch for currencies ${{ inputs.currencies }}
if: ${{ inputs.currencies }}
# TARGET_SYNC_FILE_BASENAME is based on https://github.com/LedgerHQ/ledger-live/blob/feat/live-11055-migration-account-test/libs/ledger-live-common/src/__tests__/migration/account-migration.ts#L267
run: |
pnpm common test-account-migration --currencies ${{ inputs.currencies }} --outputFolderPath /home/runner/work/ledger-live
- name: Run synchronisation on target branch on all currencies
if: ${{ !inputs.currencies }}
run: |
pnpm common test-account-migration --outputFolderPath /home/runner/work/ledger-live
- uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}

- name: install dependencies and build
run: |
pnpm i --filter="!./apps/**"
pnpm build:llc
- name: run synchronisation on current branch
run: |
pnpm common test-account-migration --inputFile /home/runner/work/ledger-live/${{ steps.target-output-file.outputs.TARGET_SYNC_FILE_BASENAME }}.json --outputFolderPath /home/runner/work/ledger-live
- name: Generate current branch output filename
id: current-branch-output-filename
run: |
CURRENT_BRANCH_SYNC_FILE_BASENAME=$(git rev-parse --short HEAD)
echo "CURRENT_BRANCH_SYNC_FILE_BASENAME=$(echo ${CURRENT_BRANCH_SYNC_FILE_BASENAME})" >> $GITHUB_OUTPUT
- name: print diff during migration
run: diff -u /home/runner/work/ledger-live/${{ steps.target-output-file.outputs.TARGET_SYNC_FILE_BASENAME }}.json /home/runner/work/ledger-live/${{ steps.current-branch-output-filename.outputs.CURRENT_BRANCH_SYNC_FILE_BASENAME }}.json || true
32 changes: 0 additions & 32 deletions .github/workflows/backup/sync.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/backup/version-or-release.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/bot-nonreg-nitrogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:

jobs:
run-bot:
runs-on: [ledger-live-medium-linux]
runs-on: [ledger-live-medium]
steps:
- name: generate token
id: generate-token
Expand All @@ -24,7 +24,7 @@ jobs:
repository: LedgerHQ/coin-apps
token: ${{ steps.generate-token.outputs.token }}
path: coin-apps
- uses: ./tools/actions/composites/bot
- uses: LedgerHQ/ledger-live/tools/actions/composites/bot@develop
id: bot
timeout-minutes: 120
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bot-nonreg-oxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:

jobs:
run-bot:
runs-on: [ledger-live-medium-linux]
runs-on: [ledger-live-medium]
steps:
- name: generate token
id: generate-token
Expand All @@ -24,7 +24,7 @@ jobs:
repository: LedgerHQ/coin-apps
token: ${{ steps.generate-token.outputs.token }}
path: coin-apps
- uses: ./tools/actions/composites/bot
- uses: LedgerHQ/ledger-live/tools/actions/composites/bot@develop
id: bot
timeout-minutes: 120
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bot-portfolio-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ permissions:

jobs:
portfolio:
runs-on: [ledger-live-medium-linux]
runs-on: [ledger-live-medium]
steps:
- name: generate token
id: generate-token
Expand All @@ -41,7 +41,7 @@ jobs:
token: ${{ steps.generate-token.outputs.token }}
path: coin-apps
- name: Setup the toolchain
uses: ./tools/actions/composites/setup-toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
with:
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
shell: bash

- name: upload reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: reports
path: libs/ledger-live-common/reports
4 changes: 2 additions & 2 deletions .github/workflows/bot-staging-explorer-btc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:

jobs:
run-bot:
runs-on: [ledger-live-medium-linux]
runs-on: [ledger-live-medium]
steps:
- name: generate token
id: generate-token
Expand All @@ -27,7 +27,7 @@ jobs:
repository: LedgerHQ/coin-apps
token: ${{ steps.generate-token.outputs.token }}
path: coin-apps
- uses: ./tools/actions/composites/bot
- uses: LedgerHQ/ledger-live/tools/actions/composites/bot@develop
id: bot
timeout-minutes: 120
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bot-staging-explorer-eth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:

jobs:
run-bot:
runs-on: [ledger-live-medium-linux]
runs-on: [ledger-live-medium]
steps:
- name: generate token
id: generate-token
Expand All @@ -27,7 +27,7 @@ jobs:
repository: LedgerHQ/coin-apps
token: ${{ steps.generate-token.outputs.token }}
path: coin-apps
- uses: ./tools/actions/composites/bot
- uses: LedgerHQ/ledger-live/tools/actions/composites/bot@develop
id: bot
timeout-minutes: 120
with:
Expand All @@ -40,5 +40,5 @@ jobs:
# These currencies are not yet handled by ATLAS, should be added back
# to the list once they are.
# avalanche_c_chain,bsc,polygon,ethereum_classic
BOT_FILTER_CURRENCIES: ethereum,ethereum_goerli,ethereum_sepolia,ethereum_holesky
BOT_FILTER_CURRENCIES: ethereum,ethereum_sepolia,ethereum_holesky
BOT_ENVIRONMENT: staging
4 changes: 2 additions & 2 deletions .github/workflows/bot-super-report-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup the toolchain
uses: ./tools/actions/composites/setup-toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
with:
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
Expand All @@ -31,7 +31,7 @@ jobs:
run: pnpm i --filter='!./apps/**'

- name: generate super report
uses: ./tools/actions/generate-bot-super-report
uses: LedgerHQ/ledger-live/tools/actions/generate-bot-super-report@develop
with:
branch: ${{inputs.branch}}
environment: ${{inputs.environment}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bot-super-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup the toolchain
uses: ./tools/actions/composites/setup-toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
with:
accountId: ${{ secrets.AWS_ACCOUNT_ID_PROD }}
roleName: ${{ secrets.AWS_CACHE_ROLE_NAME }}
Expand All @@ -23,7 +23,7 @@ jobs:
run: pnpm i --filter='!./apps/**'

- name: generate super report
uses: ./tools/actions/generate-bot-super-report
uses: LedgerHQ/ledger-live/tools/actions/generate-bot-super-report@develop
with:
branch: develop
environment: production
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bot-testing-carbon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ concurrency:

jobs:
run-bot:
runs-on: [ledger-live-medium-linux]
runs-on: [ledger-live-medium]
steps:
- name: generate token
id: generate-token
Expand All @@ -36,7 +36,7 @@ jobs:
repository: LedgerHQ/coin-apps
token: ${{ steps.generate-token.outputs.token }}
path: coin-apps
- uses: ./tools/actions/composites/bot
- uses: LedgerHQ/ledger-live/tools/actions/composites/bot@develop
id: bot
timeout-minutes: 120
with:
Expand Down
Loading

0 comments on commit 37f6c3d

Please sign in to comment.