Skip to content

Commit

Permalink
deps(sdk): fix sdk version
Browse files Browse the repository at this point in the history
feat(just): add `ci` recipe
  • Loading branch information
Karrq committed Sep 21, 2023
1 parent 9a878a3 commit 710ee24
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- varname: STAX_SDK
target: stax
container:
image: zondax/ledger-app-builder:latest
image: zondax/ledger-app-builder:ledger-d5bfe2e793f15a826971ae9de2adcad524df3e8e
env:
SDK_VARNAME: ${{ matrix.sdk.varname }}
options: --user ${{ needs.configure.outputs.uid_gid }}
Expand Down
43 changes: 43 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,46 @@ cargo *cmd='':
cargo {{cmd}}

insta: (cargo "insta test --review")

_ztest-ci:
#!/bin/env bash
pushd zemu
TESTS=`yarn test --listTests --json | head -n 3 | tail -n 1 | jq -r '.[]'`

has_failed=0
outputs=()

for file in ${TESTS[@]}; do
output=`yarn jest "$file" --maxConcurrency 2 2>&1`
exit=$?

outputs+=("$output")
if [ $exit -ne 0 ]; then
echo "=== Test $file failed ==="
has_failed=1
fi
done

if [ $has_failed -eq 1 ]; then
for i in "${!outputs[@]}"; do
output=$outputs[i]
file=$TESTS[i]
echo "=== Test Output for $file ==="
echo "$output"
done
echo "Some tests failed. See detailed output above."
exit 1
else
echo "All tests passed."
exit 0
fi

popd

# Run the same things as a normal CI workflow
ci:
just miri
cargo fmt -- --check
cargo clippy --all-targets --features "full"
just make clean all
just _ztest-ci
2 changes: 1 addition & 1 deletion deps/dockerized_build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $(info TESTS_ZEMU_DIR : $(TESTS_ZEMU_DIR))
$(info TESTS_JS_DIR : $(TESTS_JS_DIR))
$(info TESTS_JS_PACKAGE : $(TESTS_JS_PACKAGE))

DOCKER_IMAGE_ZONDAX=zondax/ledger-app-builder:latest
DOCKER_IMAGE_ZONDAX=zondax/ledger-app-builder:ledger-d5bfe2e793f15a826971ae9de2adcad524df3e8e
DOCKER_IMAGE_LEDGER=ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest

ifdef INTERACTIVE
Expand Down
2 changes: 1 addition & 1 deletion zemu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dependencies": {
"@types/node": "^18.14.6",
"@zondax/ledger-avalanche-app": "link:../js",
"@zondax/zemu": "^0.44.0"
"@zondax/zemu": "=0.44.0"
},
"devDependencies": {
"@ethereumjs/common": "^3.1.1",
Expand Down

0 comments on commit 710ee24

Please sign in to comment.