Skip to content

Commit

Permalink
fix: prNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
KVNLS committed Oct 9, 2024
1 parent b961229 commit a0e1ba7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
28 changes: 16 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,69 @@ 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
with:
prNumber: ${{ github.event.number }}
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}}
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@develop
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}}
uses: LedgerHQ/ledger-live/.github/workflows/test-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/test-mobile-reusable.yml@fix/ci-master-workflow-inputs
with:
prNumber: ${{ github.event.number }}
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
9 changes: 5 additions & 4 deletions .github/workflows/build-desktop-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: "@Desktop • Build App"

on:
workflow_call:
inputs:
prNumber:
description: PR number
type: string
required: false
workflow_dispatch:
inputs:
ref:
Expand All @@ -19,10 +24,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
13 changes: 7 additions & 6 deletions .github/workflows/build-mobile-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: "Build Mobile"

on:
workflow_call:
inputs:
prNumber:
description: PR number
type: string
required: false
workflow_dispatch:
inputs:
ref:
Expand All @@ -19,10 +24,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 +112,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

0 comments on commit a0e1ba7

Please sign in to comment.