Skip to content

Merge pull request #54 from LedgerHQ/ui/small_fixes #181

Merge pull request #54 from LedgerHQ/ui/small_fixes

Merge pull request #54 from LedgerHQ/ui/small_fixes #181

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
on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:
jobs:
build_application:
name: Build application using the reusable workflow
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
with:
upload_app_binaries_artifact: compiled_app_binaries
ragger_tests:
name: Run ragger tests
strategy:
fail-fast: false
matrix:
include:
- model: nanox
- model: stax
- model: flex
- model: nanosp
args: "--fast"
- model: nanos
args: "--fast"
- model: nanox
args: "--transport HID --fast"
needs: build_application
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
- name: Download app binaries
uses: actions/download-artifact@v4
with:
name: compiled_app_binaries
path: build/
- name: Install APT dependencies
run: sudo apt-get update && sudo apt-get install -y qemu-user-static tesseract-ocr libtesseract-dev
- name: Install tests dependencies
run: |
pip install --extra-index-url https://test.pypi.org/simple/ -r tests/speculos/requirements.txt
- name: Run test
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: pytest tests/speculos/ --tb=short -v --device ${{ matrix.model }} ${{ matrix.args }}