Skip to content

Commit

Permalink
refactor unit tests workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
parvit committed Jun 22, 2024
1 parent eb23b5d commit ea82874
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ jobs:

- name: Prepare Tests
run: |
MKDIR unit
MKDIR cover
MKDIR report
go install github.com/jstemmer/[email protected]
go install github.com/axw/gocov/[email protected]
go install github.com/matm/gocov-html/cmd/[email protected]
Expand All @@ -229,13 +232,14 @@ jobs:
if: always()
run: |
set -x
export WORKSPACE=$( echo "${{ github.workspace }}" | sed -e 's|\\|/|g' )
for i in $(go list ./... | grep -E -v "${IGNORE_PACKAGES}" | sed -n -e 's|github.com\/parvit\/qpep\/||p')
do
pushd $i
echo "=== Package $i ===" >> $GITHUB_STEP_SUMMARY
gocov convert ${{ github.workspace }}/cover/$(basename $PWD).out | gocov report | grep "Coverage" >> $GITHUB_STEP_SUMMARY || true
gocov convert $WORKSPACE/cover/$(basename $PWD).out | gocov report | grep "Coverage" >> $GITHUB_STEP_SUMMARY || true
echo >> $GITHUB_STEP_SUMMARY
gocov convert ${{ github.workspace }}/cover/$(basename $PWD).out | gocov-html > ${{ github.workspace }}/report/$(basename $PWD).html || true
gocov convert $WORKSPACE/cover/$(basename $PWD).out | gocov-html > $WORKSPACE/report/$(basename $PWD).html || true
popd
done
continue-on-error: true
Expand Down

0 comments on commit ea82874

Please sign in to comment.