Skip to content

Commit

Permalink
Fix CI zemu_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xPxt committed Nov 21, 2024
1 parent bd75db5 commit 5e4ae6f
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/build_and_functional_tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
name: Build and run functional tests using ragger through reusable workflow

# This workflow will build the app and then run functional tests using the Ragger framework upon Speculos emulation.
# It calls a reusable workflow developed by Ledger's internal developer team to build the application and upload the
# resulting binaries.
# It then calls another reusable workflow to run the Ragger tests on the compiled application binary.
#
# While this workflow is optional, having functional testing on your application is mandatory and this workflow and
# tooling environment is meant to be easy to use and adapt after forking your application
name: Build and run zemu tests

on:
workflow_dispatch:
Expand All @@ -19,6 +11,7 @@ on:
branches:
- develop
- master
- dev

jobs:
build_application:
Expand All @@ -30,7 +23,26 @@ jobs:

zemu_tests:
name: Run zemu tests
needs: build_application
needs: [build_application]
runs-on: ubuntu-latest
steps:
- run: cd tests_zemu && yarn test
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: temp_artifacts # Download to a temporary location

- name: Restructure artifacts
run: |
mkdir -p build
for device in temp_artifacts/compiled_app_binaries-*; do
device_name=$(basename "$device" | sed 's/compiled_app_binaries-//')
mkdir -p "build/$device_name"
cp -r "$device"/* "build/$device_name/"
done
rm -rf temp_artifacts
- name: Install dependencies
run: cd tests_zemu && yarn install
- name: Run tests
run: cd tests_zemu && yarn test

0 comments on commit 5e4ae6f

Please sign in to comment.