Skip to content

Commit

Permalink
- Attempt to generate coverage report for the dmrpp-generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaellh0079 committed Dec 1, 2023
1 parent 6ab0269 commit 75e7c8a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/push-to-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
- name: Checkout the repo
uses: actions/checkout@v3

- name: Get tag version
id: tag_name
run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
Expand All @@ -29,4 +29,14 @@ jobs:
context: .
push: true
tags: ghrcdaac/dmrpp-generator:${{ steps.tag_name.outputs.SOURCE_TAG }}

- name: Extract coverage report
run: |
CID=$(docker create ghrcdaac/dmrpp-generator)
docker cp "${CID}":/home/worker/build/coverage/lcov.info .
docker rm "${CID}"
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN \
WORKDIR $BUILD
RUN coverage run -m pytest
RUN coverage report
RUN coverage lcov -o ./coverage/lcov.info
RUN rm -rf tests .coverage .pytest_cache
CMD ["python", "generate_dmrpp.py"]
ENTRYPOINT []

0 comments on commit 75e7c8a

Please sign in to comment.