Skip to content

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
job_build_bitcoin:
name: Build Bitcoin application using the reusable workflow
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
with:
upload_app_binaries_artifact: "compiled_app_binaries"
flags: "DEBUG=0 COIN=bitcoin"
job_build_bitcoin_testnet:
name: Build Bitcoin application using the reusable workflow
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
with:

Check failure on line 25 in .github/workflows/ci-workflow.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci-workflow.yml

Invalid workflow file

You have an error in your yaml syntax on line 25
upload_app_binaries_artifact: "compiled_app_testnet_binaries"
flags: "DEBUG=0 COIN=bitcoin_testnet"
- name: Upload Bitcoin app binary
uses: actions/upload-artifact@v2
with:
name: bitcoin-app-${{ matrix.model }}
path: bitcoin-bin
- name: Upload Bitcoin Testnet app binary
uses: actions/upload-artifact@v2
with:
name: bitcoin-testnet-app-${{ matrix.model }}
path: bitcoin-testnet-bin
ragger_tests:
name: Run ragger tests using the reusable workflow
needs: job_build_bitcoin
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@fbe/support_linux_packages_install_in_ragger
with:
download_app_binaries_artifact: "compiled_app_binaries"
test_dir: tests
ragger_tests_testnet:
name: Run ragger tests using the reusable workflow on testnet
needs: job_build_bitcoin_testnet
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@fbe/support_linux_packages_install_in_ragger
with:
download_app_binaries_artifact: "compiled_app_testnet_binaries"
test_dir: tests
job_unit_test:
name: Unit test
needs: job_build
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Build unit tests
run: |
cd unit-tests/
cmake -Bbuild -H. && make -C build && make -C build test
- name: Generate code coverage
run: |
cd unit-tests/
lcov --directory . -b "$(realpath build/)" --capture --initial -o coverage.base && \
lcov --rc lcov_branch_coverage=1 --directory . -b "$(realpath build/)" --capture -o coverage.capture && \
lcov --directory . -b "$(realpath build/)" --add-tracefile coverage.base --add-tracefile coverage.capture -o coverage.info && \
lcov --directory . -b "$(realpath build/)" --remove coverage.info '*/unit-tests/*' -o coverage.info && \
genhtml coverage.info -o coverage
- uses: actions/upload-artifact@v2
with:
name: code-coverage
path: unit-tests/coverage
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./unit-tests/coverage.info
flags: unittests
name: codecov-app-bitcoin
fail_ci_if_error: true
verbose: true
- name: HTML documentation
run: doxygen .doxygen/Doxyfile
- uses: actions/upload-artifact@v2
with:
name: documentation
path: doc/html
job_test:
name: Tests
strategy:
matrix:
include:
- model: nanos
- model: nanox
- model: nanosp
- model: stax
needs: job_build
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/app-bitcoin-new/speculos-bitcoin:latest
ports:
- 1234:1234
- 9999:9999
- 40000:40000
- 41000:41000
- 42000:42000
- 43000:43000
options: --entrypoint /bin/bash
steps:
- name: Clone
uses: actions/checkout@v2
- name: Download Bitcoin Testnet app binary
uses: actions/download-artifact@v2
with:
name: bitcoin-testnet-app-${{matrix.model}}
path: bin
- name: Run tests
run: |
cd tests
pip install -r requirements.txt
PYTHONPATH=$PYTHONPATH:/speculos pytest --headless --model=${{ matrix.model }} --timeout=500
job_test_mainnet:
name: Tests on mainnet
strategy:
matrix:
include:
- model: nanos
- model: nanox
- model: nanosp
- model: stax
needs: job_build
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/app-bitcoin-new/speculos-bitcoin:latest
ports:
- 1234:1234
- 9999:9999
- 40000:40000
- 41000:41000
- 42000:42000
- 43000:43000
options: --entrypoint /bin/bash
steps:
- name: Clone
uses: actions/checkout@v2
- name: Download Bitcoin app binary
uses: actions/download-artifact@v2
with:
name: bitcoin-app-${{matrix.model}}
path: bin
- name: Run tests
run: |
cd tests_mainnet
pip install -r requirements.txt
PYTHONPATH=$PYTHONPATH:/speculos pytest --headless --model=${{ matrix.model }} --timeout=300
job_test_python_lib_legacyapp:
name: Tests with the Python library and legacy Bitcoin app
needs: job_build
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/app-bitcoin-new/speculos-bitcoin:latest
ports:
- 1234:1234
- 9999:9999
- 40000:40000
- 41000:41000
- 42000:42000
- 43000:43000
options: --entrypoint /bin/bash
steps:
- name: Clone
uses: actions/checkout@v2
- name: Run tests
run: |
cd bitcoin_client/tests
pip install -r requirements.txt
PYTHONPATH=$PYTHONPATH:/speculos pytest --headless --timeout=300
job_test_js_lib:
name: Tests with the JS library
needs: job_build
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/app-bitcoin-new/speculos-bitcoin:latest
ports:
- 1234:1234
- 9999:9999
- 40000:40000
- 41000:41000
- 42000:42000
- 43000:43000
options: --entrypoint /bin/bash
steps:
- name: Clone
uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install yarn
run: |
npm install -g yarn
- name: Download Bitcoin Testnet app binary
uses: actions/download-artifact@v2
with:
name: bitcoin-testnet-app-nanos
path: bin
- name: Run tests
run: |
cd bitcoin_client_js
yarn install
LOG_SPECULOS=1 LOG_APDUS=1 SPECULOS="/speculos/speculos.py" yarn test
job_test_rust_client:
name: Tests for rust client library
needs: job_build
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Run tests
run: |
cd bitcoin_client_rs/
cargo test --no-default-features --features="async"