measure coverage from login-server, speed up login-server test build

This commit is contained in:
einhorn_b 2021-05-21 17:29:13 +02:00
parent de992e365f
commit 7fa4ccdb5f
2 changed files with 44 additions and 27 deletions

View File

@ -249,12 +249,23 @@ jobs:
- name: Load Docker Image
run: docker load < /tmp/loginserver.tar
##########################################################################
# UNIT TESTS FRONTEND ####################################################
# UNIT TESTS BACKEND LOGIN-SERVER #######################################
##########################################################################
- name: Login-Server | Unit tests
run: |
docker run -v ~/coverage:/code/build/coverage -v ./configs/login_server/Gradido_LoginServer_Test.properties:/code/build/Gradido_LoginServer_Test.properties gradido/login_server:test --entrypoint
cp -r ~/coverage ./coverage
##########################################################################
# COVERAGE CHECK BACKEND LOGIN-SERVER ####################################
##########################################################################
- name: backend | Coverage check
uses: webcraftmedia/coverage-check-action@master
with:
report_name: Coverage Backend
type: lcov
result_path: ./coverage/lcov.info
min_coverage: 8
token: ${{ github.token }}
#test:
# runs-on: ubuntu-latest

View File

@ -1,8 +1,8 @@
#########################################################################################################
# Build debug
# Prepare debug
#########################################################################################################
FROM gradido/login_dependencies:alpine-debug-2 as debug
FROM gradido/login_dependencies:alpine-debug-2 as prepare_debug
ENV DOCKER_WORKDIR="/code"
WORKDIR ${DOCKER_WORKDIR}
@ -16,6 +16,36 @@ COPY ./dependencies/spirit-po ./dependencies/spirit-po
COPY ./dependencies/tinf ./dependencies/tinf
COPY ./scripts ./scripts
#########################################################################################################
# Build test
#########################################################################################################
FROM prepare_debug as test
ENV DOCKER_WORKDIR="/code"
WORKDIR ${DOCKER_WORKDIR}
RUN apk add --no-cache bash perl
#RUN git clone https://github.com/linux-test-project/lcov.git --branch=v1.15 && \
# cd lcov && \
# make install
RUN mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE=Debug .. && \
make -j$(nproc) Gradido_LoginServer_Test
#RUN chmod +x build/bin/Gradido_LoginServer_Test
#CMD [ "./build/bin/Gradido_LoginServer" ]
#ENTRYPOINT [ "/usr/bin/make", "-C", "/code/build", "coverage" ]
ENTRYPOINT cd build && make coverage;
#########################################################################################################
# Build debug
#########################################################################################################
FROM prepare_debug as debug
ENV DOCKER_WORKDIR="/code"
WORKDIR ${DOCKER_WORKDIR}
RUN mkdir build && \
cd build && \
@ -29,30 +59,6 @@ RUN cd scripts && \
RUN chmod +x build/bin/Gradido_LoginServer
ENTRYPOINT ["build/bin/Gradido_LoginServer"]
#########################################################################################################
# Build test
#########################################################################################################
FROM debug as test
ENV DOCKER_WORKDIR="/code"
WORKDIR ${DOCKER_WORKDIR}
RUN apk add --no-cache bash perl
RUN git clone https://github.com/linux-test-project/lcov.git --branch=v1.15 && \
cd lcov && \
make install
RUN cd build && \
cmake -DCMAKE_BUILD_TYPE=Debug .. && \
make -j$(nproc) Gradido_LoginServer_Test
#RUN chmod +x build/bin/Gradido_LoginServer_Test
#CMD [ "./build/bin/Gradido_LoginServer" ]
#ENTRYPOINT [ "/usr/bin/make", "-C", "/code/build", "coverage" ]
ENTRYPOINT cd build && ls -la && make coverage;
#########################################################################################################
# Build release
#########################################################################################################