Skip to content

Load app metadata from companion app_<target>.json file for Rust binaries #252

Load app metadata from companion app_<target>.json file for Rust binaries

Load app metadata from companion app_<target>.json file for Rust binaries #252

name: Build, test and deploy Ledgered
on:
workflow_dispatch:
push:
tags:
- '*'
branches:
- master
- develop
pull_request:
branches:
- master
- develop
paths:
- 'src/**'
- 'tests/**'
- .github/workflows/build_and_tests.yml
# Cancel previous runs on this reference
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_install_test:
name: Build, install and test the Ledgered Python package
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Clone
uses: actions/checkout@v4
- name: Setup Python version
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Build & install
run: |
pip install -U pip
pip install -U .[dev]
- name: Run unit tests and generate coverage
run: pytest -v --tb=short tests/unit --cov ledgered --cov-report xml
- name: Run functional tests and generate coverage
run: pytest -v --tb=short tests/functional --cov ledgered --cov-report xml --cov-append --token "${{ secrets.GITHUB_TOKEN }}"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
name: codecov-ledgered
token: ${{ secrets.CODECOV_TOKEN }}
package_and_deploy:
name: Build and deploy the Ledgered Python package
needs: [build_install_test]
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_pypi_deployment.yml@v1
with:
package_name: ledgered
publish: ${{ startsWith(github.ref, 'refs/tags/') }}
secrets:
pypi_token: ${{ secrets.PYPI_PUBLIC_API_TOKEN }}