diff --git a/Dockerfile.speculos b/Dockerfile.speculos new file mode 100644 index 0000000..126b711 --- /dev/null +++ b/Dockerfile.speculos @@ -0,0 +1,7 @@ +FROM speculos:latest + +COPY ./tests/requirements.txt /tmp/requirements.txt + +RUN apt update +RUN apt install build-essential -y +RUN pip install --extra-index-url https://test.pypi.org/simple/ -r /tmp/requirements.txt diff --git a/docker-compose.yaml b/docker-compose.yaml index 1beaaf0..3e3462b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -18,3 +18,24 @@ services: - "41000:41000" - "1234:1234" - "5000:5000" + + # functional test + ftest: + container_name: ledger-functional-tests + build: + context: . + dockerfile: Dockerfile.speculos + volumes: + - ./bin:/speculos/app + - ./:/tmp/kaspa + entrypoint: bash + command: -c "cd /tmp/kaspa/tests && pytest --tb=short --device ${TEST_DEVICE}" + + # unit tests + utest: + container_name: ledger-unit-tests + image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest + entrypoint: bash + command: -c "cd /app/unit-tests && cmake -Bbuild -H. && make -C build && CTEST_OUTPUT_ON_FAILURE=1 make -C build test" + volumes: + - .:/app \ No newline at end of file