Merge pull request #322 from LedgerHQ/cev/B2CA-2306_security #32
This file contains hidden or 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
| name: Compilation & tests | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| golden_run: | ||
| type: choice | ||
| required: true | ||
| default: 'Raise an error (default)' | ||
| description: CI behavior if the test snaphots are different than expected. | ||
| options: | ||
| - 'Raise an error (default)' | ||
| - 'Open a PR' | ||
| push: | ||
| branches: | ||
| - master | ||
| - develop | ||
| pull_request: | ||
| # Cancel previous runs on this reference | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| build_swap_test_exchange: | ||
|
Check failure on line 26 in .github/workflows/ci-workflow.yml
|
||
| name: Build Exchange app for swap tests using the reusable workflow | ||
| uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 | ||
| with: | ||
| app_repository: ${{ github.repository }} | ||
| app_branch_name: ${{ github.ref }} | ||
| upload_app_binaries_artifact: "app_exchange_binaries" | ||
| use_case: 'use_test_keys' | ||
| build_swap_test_ethereum: | ||
| name: Build Ethereum app for swap tests using the reusable workflow | ||
| uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 | ||
| with: | ||
| app_repository: 'LedgerHQ/app-ethereum' | ||
| app_branch_name: 'develop' | ||
| upload_app_binaries_artifact: "app_ethereum_binaries" | ||
| use_case: 'use_test_keys' | ||
| run_coin_swap_tests: | ||
| name: Run swap tests using the reusable workflow | ||
| needs: [build_swap_test_exchange, build_swap_test_ethereum] | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| coin: | ||
| # this list shall be built dynamically in the future | ||
| - repo: 'LedgerHQ/app-boilerplate' | ||
| branch: 'master' | ||
| uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_swap_tests.yml@v1 | ||
| with: | ||
| app_repository: ${{ matrix.coin.repo }} | ||
| app_branch_name: ${{ matrix.coin.branch }} | ||
| exchange_build_artifact: "app_exchange_binaries" | ||
| ethereum_build_artifact: "app_ethereum_binaries" | ||
| regenerate_snapshots: ${{ inputs.golden_run == 'Open a PR' }} | ||
| job_swap_functional_tests: | ||
| name: Build and run swap local tests | ||
| uses: ./.github/workflows/reusable_swap_functional_tests.yml | ||
| with: | ||
| branch_for_exchange: ${{ github.ref }} | ||
| regenerate_snapshots: ${{ inputs.golden_run == 'Open a PR' }} | ||
| build_production_application: | ||
| name: Build application using the reusable workflow | ||
| uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 | ||
| with: | ||
| # No flags | ||
| upload_app_binaries_artifact: "exchange_production_build" | ||
| ragger_production_tests: | ||
| name: Run ragger tests using the reusable workflow | ||
| needs: build_production_application | ||
| uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1 | ||
| with: | ||
| test_options: "--setup prod_build" | ||
| download_app_binaries_artifact: "exchange_production_build" | ||
| regenerate_snapshots: ${{ inputs.golden_run == 'Open a PR' }} | ||