]> Untitled Git - bdk/commitdiff
Fix code coverage CI
authorDaniela Brozzoni <danielabrozzoni@protonmail.com>
Wed, 22 Feb 2023 15:46:02 +0000 (16:46 +0100)
committerDaniela Brozzoni <danielabrozzoni@protonmail.com>
Thu, 2 Mar 2023 09:56:31 +0000 (10:56 +0100)
If you want to have tests on the hardware-signer you need to install
the python libraries and start the emulator

.github/workflows/code_coverage.yml

index 8236bedeae8083707739947744374538cc54c77e..0041cfea684e3ffde4898e9a8cf799dc9d3af2c8 100644 (file)
@@ -37,6 +37,16 @@ jobs:
           key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
       - name: Install grcov
         run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
+      - name: Build simulator image
+        run: docker build -t hwi/ledger_emulator ./ci -f ci/Dockerfile.ledger
+      - name: Run simulator image
+        run: docker run --name simulator --network=host hwi/ledger_emulator &
+      - name: Install Python
+        uses: actions/setup-python@v4
+        with:
+          python-version: '3.9'
+      - name: Install python dependencies
+        run: pip install hwi==2.1.1 protobuf==3.20.1
       - name: Test
         run: cargo test --all-features
       - name: Run grcov