Skip to content

Commit

Permalink
Add Nano S SDK 1.6.1-2 and unit tests to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
grydz committed Nov 16, 2020
1 parent 0f22fa7 commit 33b9b07
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: docker://ledgerhq/ledger-app-builder:1.6.0
image: docker://ledgerhq/ledger-app-builder:1.6.1-2

steps:
- name: Clone
Expand All @@ -24,6 +24,38 @@ jobs:
name: boilerplate-app-debug
path: bin

job_unit_test:
name: Unit test
needs: job_build_debug
runs-on: ubuntu-latest

container:
image: docker://ledgerhq/ledger-app-builder:1.6.1-2

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

- name: Build unit tests
run: |
cd unit-tests/
cmake -Bbuild -H. && make -C build && make -C build test
- name: Generate code coverage
run: |
cd unit-tests/
lcov --directory . -b "$(realpath build/)" --capture --initial -o coverage.base && \
lcov --rc lcov_branch_coverage=1 --directory . -b "$(realpath build/)" --capture -o coverage.capture && \
lcov --directory . -b "$(realpath build/)" --add-tracefile coverage.base --add-tracefile coverage.capture -o coverage.total && \
lcov --directory . -b "$(realpath build/)" --remove coverage.total '*/unit-tests/*' -o coverage.total && \
genhtml coverage.total -o coverage
- name: Upload code coverage
uses: actions/upload-artifact@v2
with:
name: code-coverage
path: unit-tests/coverage

job_test:
name: Test
needs: job_build_debug
Expand Down

0 comments on commit 33b9b07

Please sign in to comment.