-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (56 loc) · 2.06 KB
/
build_and_functional_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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 }}