Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/ldg 662 nano app migrate tests from rust to python rag #3

Open
wants to merge 33 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
021f6ff
refactor: move the rust tests to a new folder
keiff3r Feb 6, 2025
0255d23
test: add the ragger test structure from the latest boilerplate
keiff3r Feb 6, 2025
8128122
refactor: update instruction types and error codes to match with the …
keiff3r Feb 6, 2025
9d16f28
refactor: rename all instances of 'boilerplate' to 'everscale'
keiff3r Feb 6, 2025
dd8b75c
ops: add the ci workflow from the boilerplate app
keiff3r Feb 6, 2025
26087f5
build: remove "Pending review"
keiff3r Feb 6, 2025
e819bca
chore: update .gitignore and ledger_app.toml
keiff3r Feb 6, 2025
a507a33
test: add active_test_scope marker for pytest
keiff3r Feb 6, 2025
4a94604
test: add test for app configuration command
keiff3r Feb 6, 2025
25dcc40
chore: enhance .gitignore with more comprehensive file exclusions
keiff3r Feb 6, 2025
9f90c9b
test: update public key retrieval tests for Everscale app
keiff3r Feb 6, 2025
fa65f97
test: add tests for Everscale address retrieval functionality
keiff3r Feb 10, 2025
dea39ec
test: add message and transaction signing tests for Everscale app (in…
keiff3r Feb 10, 2025
f7c0a65
test: update transaction signing test
keiff3r Feb 12, 2025
75152dd
refactor: update sign flow message display text
keiff3r Feb 12, 2025
8f7908a
test: implement message signing test
keiff3r Feb 12, 2025
c1747e5
test: delete useless tests
keiff3r Feb 12, 2025
e3b548a
test: update transaction signing test with TODO comments
keiff3r Feb 12, 2025
dc5e999
ops: remove ClusterFuzzLite and documentation workflows
keiff3r Feb 12, 2025
8045bd6
style: format the C codebase
keiff3r Feb 12, 2025
2c3d452
ops: remove unused workflow
keiff3r Feb 12, 2025
8609678
style: clean up and format Everscale command sender and response unpa…
keiff3r Feb 12, 2025
2bf3059
chore: delete unused rust files
keiff3r Feb 12, 2025
83d597c
chore: correct a typo in the Makefile
keiff3r Feb 12, 2025
6531a7e
chore: comment out entire Everscale transaction class
keiff3r Feb 12, 2025
cc41001
chore: fix typo in Makefile comment
keiff3r Feb 12, 2025
fd0a416
refactor: remove unused get_app_name method from Everscale command se…
keiff3r Feb 12, 2025
f16c8a8
style: format commented Everscale transaction class code
keiff3r Feb 12, 2025
d3d9a74
ops: remove useless GitHub CI workflow
Meg4me Feb 13, 2025
13b84c0
ops: update CodeQL workflow to reduce SDK matrix
keiff3r Feb 13, 2025
957eec2
style: add .clang-format and format the code accordingly
keiff3r Feb 13, 2025
635d789
test: add 2 test cases and refactor how tests run
keiff3r Feb 13, 2025
4d2dab1
test: generate golden snapshots
keiff3r Feb 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
BasedOnStyle: Google
IndentWidth: 4
Language: Cpp
ColumnLimit: 100
PointerAlignment: Right
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: true
AllowAllParametersOfDeclarationOnNextLine: false
SortIncludes: false
SpaceAfterCStyleCast: true
AllowShortCaseLabelsOnASingleLine: false
AllowAllArgumentsOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: None
BinPackArguments: false
BinPackParameters: false
---
43 changes: 43 additions & 0 deletions .github/workflows/build_and_functional_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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.
#
# The build part of this workflow is mandatory, this ensures that the app will be deployable in the Ledger App Store.
# While the test part of 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:
inputs:
golden_run:
type: choice
required: true
default: 'Raise an error (default)'
description: CI behavior if the test snapshots are different than expected.
options:
- 'Raise an error (default)'
- 'Open a PR'
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 using the reusable workflow
needs: build_application
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1
with:
download_app_binaries_artifact: "compiled_app_binaries"
regenerate_snapshots: ${{ inputs.golden_run == 'Open a PR' }}
53 changes: 0 additions & 53 deletions .github/workflows/ci.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/codeql_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "CodeQL"

on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:
# Excluded path: add the paths you want to ignore instead of deleting the workflow
paths-ignore:
- '.github/workflows/*.yml'
- 'tests/*'

jobs:
analyse:
name: Analyse
strategy:
fail-fast: false
matrix:
sdk: ["$NANOX_SDK", "$NANOSP_SDK"]
# 'cpp' covers C and C++
language: ['cpp']
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-legacy:latest

steps:
- name: Clone
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-and-quality

# CodeQL will create the database during the compilation
- name: Build
run: |
make BOLOS_SDK=${{ matrix.sdk }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
25 changes: 25 additions & 0 deletions .github/workflows/coding_style_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run coding style check through reusable workflow

# This workflow will run linting checks to ensure a level of uniformization among all Ledger applications.
#
# The presence of this workflow is mandatory as a minimal level of linting is required.
# You are however free to modify the content of the .clang-format file and thus the coding style of your application.
# We simply ask you to not diverge too much from the linting of the everscale application.

on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:

jobs:
check_linting:
name: Check linting using the reusable workflow
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_lint.yml@v1
with:
source: './src'
extensions: 'h,c'
version: 12
28 changes: 28 additions & 0 deletions .github/workflows/misspellings_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Misspellings checks

# This workflow performs some misspelling checks on the repository
# It is there to help us maintain a level of quality in our codebase and does not have to be kept on forked
# applications.

on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:

jobs:
misspell:
name: Check misspellings
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v4

- name: Check misspellings
uses: codespell-project/actions-codespell@v2
with:
builtin: clear,rare
check_filenames: true
41 changes: 41 additions & 0 deletions .github/workflows/python_client_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Checks on the Python client

# This workflow performs some checks on the Python client used by the everscale tests
# It is there to help us maintain a level of quality in our codebase and does not have to be kept on forked
# applications.

on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:

jobs:
lint:
name: everscale client linting
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v4
- name: Installing PIP dependencies
run: |
pip install pylint
pip install -r tests/requirements.txt
- name: Lint Python code
run: pylint --rc tests/setup.cfg tests/application_client/

mypy:
name: Type checking
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v4
- name: Installing PIP dependencies
run: |
pip install mypy
pip install -r tests/requirements.txt
- name: Mypy type checking
run: mypy tests/application_client/
21 changes: 19 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,34 @@
# Build and compilation directories (Répertoires de compilation)
bin
debug
dep
obj
dev-env

# Generated source files
src/glyphs.c
src/glyphs.h

# IDE/editor specific files
.idea
.vscode
gitignore

# Dependency directories
node_modules

# Log files and test specifications
*.log*
*.spec

# Build output and distribution directories
build
dist
*.spec
*.DS_Store
client/target

# Operating system files
*.DS_Store

# Python cache and temporary files
__pycache__
snapshots-tmp
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ else
endif
APP_LOAD_PARAMS += $(COMMON_LOAD_PARAMS)

# Pending review parameters
APP_LOAD_PARAMS += --tlvraw 9F:01
DEFINES += HAVE_PENDING_REVIEW_SCREEN
# # Pending review parameters
# APP_LOAD_PARAMS += --tlvraw 9F:01
# DEFINES += HAVE_PENDING_REVIEW_SCREEN

##################
# Define Version #
Expand All @@ -42,7 +42,7 @@ APPVERSION_P = 9
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"

###########################
# Set Chain environnement #
# Set Chain environment #
###########################

ifeq ($(CHAIN),)
Expand Down
Loading
Loading