Skip to content

Commit 8dcb190

Browse files
committed
Use manifest usecase to set compilation flags for Exchange and Ethereum in swap tests
1 parent 414941f commit 8dcb190

File tree

2 files changed

+11
-44
lines changed

2 files changed

+11
-44
lines changed

.github/workflows/build_and_functional_tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@ jobs:
4040
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@y333/manage_several_pytest_directories
4141
with:
4242
download_app_binaries_artifact: "compiled_app_binaries"
43-
regenerate_snapshots: ${{ inputs.golden_run == 'Open a PR' }}
43+
regenerate_snapshots: ${{ github.event_name == 'workflow_dispatch' && inputs.golden_run == 'Open a PR' }}
4444
test_dir: "tests/standalone"
4545

4646
tests_swap:
4747
name: Run swap tests using the callable workflow
48-
needs: build_application
4948
uses: ./.github/workflows/callable_swap_tests.yml
5049
with:
51-
is_app_compiled: true
52-
regenerate_snapshots: ${{ inputs.golden_run == 'Open a PR' }}
50+
branch_for_app: ${{ github.ref }}
51+
regenerate_snapshots: ${{ github.event_name == 'workflow_dispatch' && inputs.golden_run == 'Open a PR' }}

.github/workflows/callable_swap_tests.yml

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,15 @@ name: Callable Swap Functional tests
22

33
on:
44
workflow_call:
5-
workflow_dispatch:
65
inputs:
76
branch_for_app:
87
required: false
98
default: 'develop'
109
type: string
11-
repo_for_app:
12-
required: false
13-
default: 'LedgerHQ/app-boilerplate'
14-
type: string
15-
is_app_compiled:
16-
required: false
17-
default: false
18-
type: boolean
1910
branch_for_exchange:
2011
required: false
2112
default: 'develop'
2213
type: string
23-
repo_for_exchange:
24-
required: false
25-
default: 'LedgerHQ/app-exchange'
26-
type: string
27-
is_exchange_compiled:
28-
required: false
29-
default: false
30-
type: boolean
31-
branch_for_ethereum:
32-
required: false
33-
default: 'develop'
34-
type: string
35-
repo_for_ethereum:
36-
required: false
37-
default: 'LedgerHQ/app-ethereum'
38-
type: string
39-
is_ethereum_compiled:
40-
required: false
41-
default: false
42-
type: boolean
4314
regenerate_snapshots:
4415
required: false
4516
default: false
@@ -48,40 +19,37 @@ jobs:
4819
build_application:
4920
name: Build application using the reusable workflow
5021
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@y333/manage_several_pytest_directories
51-
if: ${{ inputs.is_app_compiled == false }}
5222
with:
53-
app_repository: ${{ inputs.repo_for_app }}
23+
app_repository: 'LedgerHQ/app-boilerplate'
5424
app_branch_name: '${{ inputs.branch_for_app }}'
55-
upload_app_binaries_artifact: "compiled_app_binaries"
25+
upload_app_binaries_artifact: "compiled_app_binaries_bis"
5626

5727
build_exchange:
5828
name: Build Exchange app using the reusable workflow
5929
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@y333/manage_several_pytest_directories
60-
if: ${{ inputs.is_exchange_compiled == false }}
6130
with:
62-
app_repository: ${{ inputs.repo_for_exchange }}
31+
app_repository: 'LedgerHQ/app-exchange'
6332
app_branch_name: '${{ inputs.branch_for_exchange }}'
6433
upload_app_binaries_artifact: "compiled_exchange_binaries"
65-
flags: 'TESTING=1 TEST_PUBLIC_KEY=1 TRUSTED_NAME_TEST_KEY=1 DEBUG=1'
34+
use_case: 'dbg_full_replay'
6635

6736
build_ethereum:
6837
name: Build Ethereum app using the reusable workflow
6938
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@y333/manage_several_pytest_directories
70-
if: ${{ inputs.is_ethereum_compiled == false }}
7139
with:
72-
app_repository: ${{ inputs.repo_for_ethereum }}
73-
app_branch_name: '${{ inputs.branch_for_ethereum }}'
40+
app_repository: 'LedgerHQ/app-ethereum'
41+
app_branch_name: 'develop'
7442
upload_app_binaries_artifact: "compiled_ethereum_binaries"
7543
upload_as_lib_artifact: "ethereum_"
76-
flags: 'COIN=ethereum CHAIN=ethereum CAL_TEST_KEY=1 DOMAIN_NAME_TEST_KEY=1 SET_PLUGIN_TEST_KEY=1 NFT_TEST_KEY=1 TRUSTED_NAME_TEST_KEY=1'
44+
use_case: 'use_test_keys'
7745

7846
# This job runs the swap functional tests using the reusable workflow
7947
ragger_tests_swap:
8048
name: Run swap ragger tests using the reusable workflow
8149
needs: [build_application, build_exchange, build_ethereum]
8250
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@y333/manage_several_pytest_directories
8351
with:
84-
download_app_binaries_artifact: "compiled_app_binaries"
52+
download_app_binaries_artifact: "compiled_app_binaries_bis"
8553
additional_app_binaries_artifact: "compiled_exchange_binaries"
8654
additional_app_binaries_artifact_dir: "tests/swap/main_app/exchange/build"
8755
lib_binaries_artifact: "compiled_ethereum_binaries"

0 commit comments

Comments
 (0)