Skip to content

Commit

Permalink
fix: test to dispatch a reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
KVNLS committed Sep 11, 2024
1 parent 42339b2 commit daebebd
Show file tree
Hide file tree
Showing 7 changed files with 252 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "@Desktop • Build App"
run-name: "@Desktop • Build App triggered by ${{ inputs.login || github.actor }} ${{ format('on ref {0}', github.ref_name) }}"

on:
workflow_dispatch:
inputs:
ref:
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: false
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false
prNumber:
description: PR number
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true

permissions:
id-token: write
contents: read
pull-requests: write

jobs:
build-desktop:
name: "Build Desktop"
uses: LedgerHQ/ledger-live/.github/workflows/build-desktop-reusable.yml@feat/ci-improvements
secrets: inherit
35 changes: 35 additions & 0 deletions .github/workflows/build-mobile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "@Mobile • Build App"
run-name: "@Mobile • Build App triggered by ${{ inputs.login || github.actor }} ${{ format('on ref {0}', github.ref_name) }}"

on:
workflow_dispatch:
inputs:
ref:
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: false
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false
prNumber:
description: PR number
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
build-mobile:
name: "Build Mobile"
uses: LedgerHQ/ledger-live/.github/workflows/build-mobile-reusable.yml@feat/ci-improvements
secrets: inherit
32 changes: 32 additions & 0 deletions .github/workflows/test-design-system.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "@Design System • Tests"
run-name: "@Design System • Tests triggered by ${{ inputs.login || github.actor }} ${{ format('on ref {0}', github.ref_name) }}"

on:
workflow_dispatch:
inputs:
since_branch:
description: The branch that turborepo will check when diffing.
default: "develop"
ref:
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: false
login:
description: The GitHub username that triggered the workflow
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
test-design-system:
name: "Test Design System"
uses: LedgerHQ/ledger-live/.github/workflows/test-design-system-reusable.yml@feat/ci-improvements
secrets: inherit
29 changes: 29 additions & 0 deletions .github/workflows/test-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "@Desktop • Test App"
run-name: "@Desktop • Test App triggered by ${{ inputs.login || github.actor }} ${{ format('on ref {0}', github.ref_name) }}"

on:
workflow_dispatch:
inputs:
ref:
description: the branch which triggered this workflow
required: false
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
test-desktop:
name: "Test Desktop"
uses: LedgerHQ/ledger-live/.github/workflows/test-desktop-reusable.yml@feat/ci-improvements
secrets: inherit
33 changes: 33 additions & 0 deletions .github/workflows/test-libs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "@Libraries • Tests"
run-name: "@Libraries • Tests triggered by ${{ inputs.login || github.actor }} ${{ format('on ref {0}', github.ref_name) }}"

on:
workflow_dispatch:
inputs:
since_branch:
description: The branch that turborepo will check when diffing.
default: "develop"
ref:
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: false
login:
description: The GitHub username that triggered the workflow
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true

permissions:
id-token: write
contents: read
pull-requests: write

jobs:
test-libraries:
name: "Test Libraries"
uses: LedgerHQ/ledger-live/.github/workflows/test-libs-reusable.yml@feat/ci-improvements
secrets: inherit
49 changes: 49 additions & 0 deletions .github/workflows/test-mobile-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "@Mobile • Test App End-2-End"
run-name: "@Mobile • Test App End-2-End triggered by ${{ inputs.login || github.actor }} ${{ format('on ref {0}', github.ref_name) }}"

on:
workflow_dispatch:
inputs:
ref:
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false
export_to_xray:
description: Send tests results to Xray
required: false
type: boolean
default: false
test_execution_android:
description: "[Android] Test Execution ticket ID. Ex: 'B2CQA-2461'"
required: false
type: string
test_execution_ios:
description: "[iOS] Test Execution ticket ID. Ex: 'B2CQA-2461'"
required: false
type: string

# Uncomment to have log-level: trace on detox run and build
# (cf: apps/ledger-live-mobile/detox.config.js)
# env:
# DEBUG_DETOX: true

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
test-mobile-e2e:
name: "Test Mobile E2E"
uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-e2e-reusable.yml@feat/ci-improvements
secrets: inherit
38 changes: 38 additions & 0 deletions .github/workflows/test-mobile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "@Mobile • Test App"
run-name: "@Mobile • Test App triggered by ${{ inputs.login || github.actor }} ${{ format('on ref {0}', github.ref_name) }}"

on:
push:
branches:
- main
- develop
- release
- hotfix
workflow_dispatch:
inputs:
ref:
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: false
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true

permissions:
id-token: write
contents: read

jobs:
test-mobile:
name: "Test Mobile"
uses: LedgerHQ/ledger-live/.github/workflows/test-mobile-reusable.yml@feat/ci-improvements
secrets: inherit

0 comments on commit daebebd

Please sign in to comment.