Skip to content

Commit

Permalink
Add dockerized testing
Browse files Browse the repository at this point in the history
  • Loading branch information
coderofstuff committed Apr 9, 2023
1 parent 6c01d83 commit dd34839
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile.speculos
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dd34839

Please sign in to comment.