-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from LedgerHQ/monorepo-setup
Monorepo groundwork
- Loading branch information
Showing
446 changed files
with
59,474 additions
and
98,809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@1.7.0/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "monorepo-setup", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
name: Bug - Ledger Live Application | ||
about: Report bugs related to the Ledger Live Desktop or Mobile applications. | ||
title: '' | ||
labels: applications, bug, Needs Triage | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
Note: Please search to see if an issue already exists for the bug you encountered. | ||
--> | ||
|
||
**Describe the bug** | ||
|
||
_A clear and concise description of what the bug is._ | ||
|
||
**To Reproduce** | ||
|
||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
|
||
_A clear and concise description of what you expected to happen._ | ||
|
||
**Screenshots** | ||
|
||
_If applicable, add screenshots to help explain your problem._ | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
|
||
**Additional context** | ||
|
||
_Add any other context about the problem here._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: Bug - Libraries | ||
about: Report bugs related to the libraries. | ||
title: '' | ||
labels: bug, libraries, Needs Triage | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
Note: Please search to see if an issue already exists for the bug you encountered. | ||
--> | ||
|
||
**Details** | ||
- Impacted Library: [e.g. `@ledgerhq/live-common`] | ||
- Version: [e.g. `1.2.3`] | ||
|
||
**Describe the bug** | ||
|
||
_A clear and concise description of what the bug is._ | ||
|
||
**Expected behavior** | ||
|
||
_A clear and concise description of what you expected to happen._ | ||
|
||
**Additional context** | ||
|
||
_Add any other context about the problem here._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement, Needs Triage | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
Disclaimer | ||
---------- | ||
Regarding Ledger Applications (Ledger Live Desktop, Ledger Live Mobile) we are only accepting bug reports for the moment. | ||
There is a good chance that we will reject feature requests based on the fact that they do not fit our roadmap or our long-term goals. | ||
--> | ||
|
||
**Context** | ||
|
||
_Specify which application or library is concerned._ | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
|
||
_A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]_ | ||
|
||
**Describe the solution you'd like** | ||
|
||
_A clear and concise description of what you want to happen._ | ||
|
||
**Describe alternatives you've considered** | ||
|
||
_A clear and concise description of any alternative solutions or features you've considered._ | ||
|
||
**Additional context** | ||
|
||
_Add any other context or screenshots about the feature request here._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
desktop: | ||
- apps/ledger-live-desktop/**/* | ||
|
||
mobile: | ||
- apps/ledger-live-mobile/**/* | ||
|
||
common: | ||
- libs/ledger-live-common/**/* | ||
|
||
ui: | ||
- libs/ui/**/* | ||
|
||
ledgerjs: | ||
- libs/ledgerjs/**/* | ||
|
||
tools: | ||
- tools/**/* | ||
|
||
automation: | ||
- .github/**/* | ||
|
||
translations: | ||
- apps/ledger-live-desktop/static/i18n/**/* | ||
- apps/ledger-live-mobile/src/locales/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!-- | ||
Thank you for your contribution! 👍 | ||
Please make sure to read the [Contributing guidelines](https://github.com/LedgerHQ/ledger-live/blob/monorepo-setup/CONTRIBUTING.md) if you have not already. | ||
Disclaimer: Pull Requests that do not comply with the rules will be arbitrarily closed. | ||
--> | ||
|
||
### ❓ Context | ||
|
||
- **Impacted projects**: [e.g. `live-desktop`, `@ledgerhq/live-common`] | ||
<!-- | ||
If your PR is linked to a Github issue, post it below. | ||
For Ledger employees, post a link to the JIRA ticket if relevant. | ||
--> | ||
- **Linked resource(s)**: | ||
|
||
_Write a clear and concise description of what this pull request is about and why it is needed._ | ||
|
||
### ✅ Checklist | ||
|
||
- [ ] **Test coverage**: _Did you write any tests to cover the changes introduced by this pull request?_ | ||
- [ ] **Atomic delivery**: _Is this pull request standalone? In order words, does it depend on nothing else?_ | ||
- [ ] **Breaking changes**: _Does this pull request contain breaking changes of any kind? If so, please explain why._ | ||
|
||
### 📸 Demo | ||
|
||
<!-- | ||
If relevant, add screenshots or video recordings to demonstrate the changes. | ||
For libraries, you can add a code sample. | ||
--> | ||
|
||
### 🚀 Expectations to reach | ||
|
||
_Please make sure you follow these [**Important Steps**](https://github.com/LedgerHQ/ledger-live/blob/monorepo-setup/CONTRIBUTING.md#important-steps)._ | ||
|
||
_Pull Requests must pass the CI and be internally validated in order to be merged._ | ||
|
||
<!-- If any of the expectations are not met please explain the reason in detail. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "Bot Coin Family", | ||
"description": "create a bot for a coin family" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Bot '$coin on Silicium' | ||
on: | ||
push: | ||
branches: | ||
- feat/$coin | ||
|
||
concurrency: | ||
group: bot-seed3-$coin | ||
|
||
jobs: | ||
start-runner: | ||
name: "start ec2 instance (Linux)" | ||
if: ${{ always() }} | ||
uses: ledgerhq/actions/.github/workflows/start-linux-runner.yml@main | ||
secrets: | ||
CI_BOT_TOKEN: ${{ secrets.CI_BOT_TOKEN }} | ||
|
||
stop-runner: | ||
name: "stop ec2 instance (Linux)" | ||
needs: [start-runner, run-bot] | ||
uses: ledgerhq/actions/.github/workflows/stop-linux-runner.yml@main | ||
if: ${{ always() }} | ||
with: | ||
label: ${{ needs.start-runner.outputs.label }} | ||
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }} | ||
secrets: | ||
CI_BOT_TOKEN: ${{ secrets.CI_BOT_TOKEN }} | ||
|
||
run-bot: | ||
runs-on: ${{ needs.start-runner.outputs.label }} | ||
needs: [start-runner] | ||
steps: | ||
- name: prepare runner | ||
run: | | ||
sudo growpart /dev/nvme0n1 1 | ||
sudo resize2fs /dev/nvme0n1p1 | ||
- uses: actions/checkout@v3 | ||
- name: Retrieving coin apps | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: LedgerHQ/coin-apps | ||
token: ${{ secrets.GH_PAT }} | ||
path: coin-apps | ||
- uses: pnpm/action-setup@v2.0.1 | ||
with: | ||
version: latest | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14.x | ||
cache: pnpm | ||
cache-dependency-path: "**/pnpm-lock.yaml" | ||
- name: pull docker image | ||
run: docker pull ghcr.io/ledgerhq/speculos | ||
- name: install and build | ||
run: | | ||
pnpm i --filter="live-cli..." --filter="ledger-live" --frozen-lockfile | ||
pnpm build:cli | ||
- name: bot logic | ||
env: | ||
SEED: ${{ secrets.SEED3 }} | ||
BOT_REPORT_FOLDER: botreport | ||
VERBOSE_FILE: botreport/logs.txt | ||
GITHUB_RUN_ID: ${{ github.run_id }} | ||
GITHUB_WORKFLOW: ${{ github.workflow }} | ||
BOT_FILTER_FAMILY: $coin | ||
run: | | ||
mkdir libs/ledger-live-common/botreport | ||
COINAPPS=$PWD/coin-apps pnpm common ci-test-bot | ||
timeout-minutes: 120 | ||
- name: submit bot report | ||
uses: ledgerhq/ledger-live/tools/actions/submit-bot-report@monorepo-setup | ||
with: | ||
path: libs/ledger-live-common/botreport/ | ||
githubSha: ${{github.sha}} | ||
githubToken: ${{github.token}} | ||
slackApiToken: ${{secrets.SLACK_API_TOKEN}} | ||
slackChannel: ci-$coin-ll | ||
- name: upload logs to github artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: botreport | ||
path: libs/ledger-live-common/botreport/ | ||
- name: Test coverage | ||
if: always() | ||
run: npx codecov -F bot | ||
env: | ||
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: "Auto Author Assign" | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, reopened] | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
assign-author: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: toshimaru/auto-author-assign@v1.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Version or Release | ||
on: | ||
push: | ||
branches: | ||
- monorepo-setup | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2.1.0 | ||
with: | ||
version: latest | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14.x | ||
cache: pnpm | ||
cache-dependency-path: "**/pnpm-lock.yaml" | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 # Not needed with a .ruby-version file | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
|
||
- name: Install Dependencies | ||
run: pnpm i -F "ledger-live" -F "{libs/**}..." --frozen-lockfile | ||
|
||
- name: Create Release Pull Request or Publish to npm/Github | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
version: pnpm bump | ||
publish: pnpm release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
Oops, something went wrong.