Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI master workflow #8060

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
jobs:
determine-affected:
name: "Turbo Affected"
if: ${{github.event.pull_request.head.repo.full_name == github.repository }}
if: ${{!github.event.pull_request.head.repo.fork }}
uses: LedgerHQ/ledger-live/.github/workflows/turbo-affected-reusable.yml@develop
with:
head_branch: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
Expand All @@ -24,65 +24,65 @@ jobs:
build-desktop:
name: "Build Desktop"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name == github.repository }}
uses: LedgerHQ/ledger-live/.github/workflows/build-desktop-reusable.yml@develop
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && !github.event.pull_request.head.repo.fork }}
uses: LedgerHQ/ledger-live/.github/workflows/build-desktop-reusable.yml@fix/ci-master-workflow-inputs
secrets: inherit

test-desktop:
name: "Test Desktop"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && !github.event.pull_request.head.repo.fork}}
uses: LedgerHQ/ledger-live/.github/workflows/test-desktop-reusable.yml@develop
secrets: inherit

# LLM
build-mobile:
name: "Build Mobile"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && github.event.pull_request.head.repo.full_name == github.repository}}
uses: LedgerHQ/ledger-live/.github/workflows/build-mobile-reusable.yml@develop
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && !github.event.pull_request.head.repo.fork}}
uses: LedgerHQ/ledger-live/.github/workflows/build-mobile-reusable.yml@fix/ci-master-workflow-inputs
secrets: inherit

test-mobile:
name: "Test Mobile"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && !github.event.pull_request.head.repo.fork}}
uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-reusable.yml@develop
secrets: inherit

test-mobile-e2e:
name: "Test Mobile E2E"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && !github.event.pull_request.head.repo.fork}}
uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-e2e-reusable.yml@develop
secrets: inherit

# Tests
test-libraries:
name: "Test Libraries"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'libs') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{contains(needs.determine-affected.outputs.paths, 'libs') && !github.event.pull_request.head.repo.fork}}
uses: LedgerHQ/ledger-live/.github/workflows/test-libs-reusable.yml@develop
secrets: inherit

test-design-system:
name: "Test Design System"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'libs/ui') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{contains(needs.determine-affected.outputs.paths, 'libs/ui') && !github.event.pull_request.head.repo.fork}}
uses: LedgerHQ/ledger-live/.github/workflows/test-design-system-reusable.yml@develop
secrets: inherit

test-web-tools:
name: "Test Web Tools"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'apps/web-tools') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{contains(needs.determine-affected.outputs.paths, 'apps/web-tools') && !github.event.pull_request.head.repo.fork}}
uses: LedgerHQ/ledger-live/.github/workflows/test-web-tools-reusable.yml@develop
secrets: inherit

test-cli:
name: "Test CLI"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'apps/cli') && github.event.pull_request.head.repo.full_name == github.repository}}
if: ${{contains(needs.determine-affected.outputs.paths, 'apps/cli') && !github.event.pull_request.head.repo.fork}}
uses: LedgerHQ/ledger-live/.github/workflows/test-cli-reusable.yml@develop
secrets: inherit

Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/build-desktop-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ on:
description: The base branch to merge the head into when checking out the code
type: string
required: false
prNumber:
description: PR number
type: string
required: false

permissions:
id-token: write
Expand Down Expand Up @@ -155,11 +151,11 @@ jobs:
return JSON.stringify(obj);

- uses: LedgerHQ/ledger-live/tools/actions/build-checks@develop
if: ${{ !cancelled() && inputs.prNumber != '' }}
if: ${{ !cancelled() && github.event.number != '' }}
with:
token: ${{ steps.generate-token.outputs.token }}
baseBranch: ${{ inputs.base_ref || 'develop' }}
prNumber: ${{ inputs.prNumber }}
prNumber: ${{ github.event.number}}
mode: desktop

- uses: LedgerHQ/ledger-live/tools/actions/desktop-report-build@develop
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/build-mobile-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ on:
description: The base branch to merge the head into when checking out the code
type: string
required: false
prNumber:
description: PR number
type: string
required: false

permissions:
id-token: write
Expand Down Expand Up @@ -111,8 +107,8 @@ jobs:
with:
max_attempts: 2
timeout_minutes: 15
command: pnpm i --filter="live-mobile..." --filter="ledger-live" --no-frozen-lockfile --unsafe-perm
new_command_on_retry: rm -rf ~/.cocoapods/ && pnpm clean && pnpm i --filter="live-mobile..." --filter="ledger-live" --no-frozen-lockfile --unsafe-perm
command: pnpm i --filter="live-mobile..." --filter="ledger-live" --no-frozen-lockfile --unsafe-perm
new_command_on_retry: rm -rf ~/.cocoapods/ && pnpm clean && pnpm i --filter="live-mobile..." --filter="ledger-live" --no-frozen-lockfile --unsafe-perm
- name: bundle ios and android js
run: |
pnpm build:llm:deps --api="http://127.0.0.1:${{ steps.caches.outputs.port }}" --token="${{ secrets.TURBOREPO_SERVER_TOKEN }}" --team="foo"
Expand Down Expand Up @@ -144,11 +140,11 @@ jobs:
with:
name: mobile.metafile.json
- uses: LedgerHQ/ledger-live/tools/actions/build-checks@develop
if: inputs.prNumber != ''
if: github.event.number != ''
with:
token: ${{ steps.generate-token.outputs.token }}
baseBranch: ${{ inputs.base_ref || 'develop' }}
prNumber: ${{ inputs.prNumber }}
prNumber: ${{ github.event.number}}
mode: mobile
- uses: actions/github-script@v7
name: get statuses of runs
Expand Down
1 change: 1 addition & 0 deletions libs/ledger-key-ring-protocol/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
};

const getApi = (apiBaseURL: string) => {
console.log("hello");

Check failure on line 68 in libs/ledger-key-ring-protocol/src/api.ts

View workflow job for this annotation

GitHub Actions / Test Libraries / Codecheck Libraries

Unexpected console statement
async function getAuthenticationChallenge(): Promise<{ json: Challenge; tlv: string }> {
const { data } = await network<{ json: Challenge; tlv: string }>({
url: `${apiBaseURL}/v1/challenge`,
Expand Down
Loading