Skip to content

Commit 491be3d

Browse files
authored
Migrate coverage to Coveralls GHA (#67)
1 parent 32025fb commit 491be3d

File tree

10 files changed

+58
-341
lines changed

10 files changed

+58
-341
lines changed

.github/actions/publish-coverage/Dockerfile

-15
This file was deleted.

.github/actions/publish-coverage/action.yml

-5
This file was deleted.

.github/actions/publish-coverage/publish-to-coveralls.sh

-15
This file was deleted.

.github/actions/publish-coverage/report/LICENSE

-177
This file was deleted.

.github/actions/publish-coverage/report/report.py

-101
This file was deleted.

.github/actions/run-tests-in-container/Dockerfile

+6-7
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,19 @@
77
# $ docker run --rm --volume $(pwd)/../../../:/note-arduino/ --workdir /note-arduino/ note-arduino-test
88

99
# Base Image
10-
FROM alpine
10+
FROM alpine:3.14
1111

1212

1313
# Testing Dependencies
14-
# install gcovr from the package manager, which gets most required dependencies (avoiding the need for libxml2-dev, libxslt-dev and setting the include path.)
15-
# then install using pip to get the 5.x line with support for coveralls formatted reports.
1614
RUN ["ash", "-c", "\
1715
apk add --no-cache \
18-
gcovr \
19-
py3-pip \
20-
python3-dev \
2116
g++ \
2217
valgrind \
23-
&& pip install -U gcovr \
18+
"]
19+
20+
RUN ["ash", "-c", "\
21+
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
22+
lcov \
2423
"]
2524

2625
ENTRYPOINT ["./test/run_all_tests.sh"]

.github/workflows/note-arduino-ci.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ jobs:
1818
- name: Run Tests In Container
1919
id: containerized_tests
2020
uses: ./.github/actions/run-tests-in-container
21-
env:
22-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
21+
- name: Coveralls Action Bug Workaround
22+
id: coveralls_bug_workaround
23+
run: sudo sed -i 's/github\/workspace/home\/runner\/work\/note-arduino\/note-arduino/g' ./coverage/lcov.info
2324
- name: Publish Test Coverage
2425
id: publish_coverage
25-
uses: ./.github/actions/publish-coverage
26-
26+
uses: coverallsapp/github-action@master
27+
with:
28+
github-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*.gcno
77
*.gcov
88

9+
coverage/
10+
911
Doxyfile*
1012
doxygen_sqlite3.db
1113
html

0 commit comments

Comments
 (0)