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 b917ccb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
16 changes: 14 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,16 @@ jobs:
context: .
push: true
tags: ghrcdaac/dmrpp-generator:${{ steps.tag_name.outputs.SOURCE_TAG }}

- name: Extract coverage report
run: |
mkdir coverage
CID=$(docker create ghrcdaac/dmrpp-generator:${{ steps.tag_name.outputs.SOURCE_TAG }})
docker cp "${CID}":/home/worker/build/coverage/lcov.info ./coverage
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 b917ccb

Please sign in to comment.