Skip to content

Commit

Permalink
Fixed code coverage GithHub Action (#4641)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Kozlovic <[email protected]>
  • Loading branch information
kozlovic authored Oct 9, 2023
2 parents 72430e7 + 0a4f2e6 commit eadb19f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/cov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ jobs:
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
set -e
cd src/github.com/nats-io/nats-server
./scripts/cov.sh upload
set +e
- name: Convert coverage.out to coverage.lcov
uses: jandelgado/[email protected]
with:
infile: acc.out
working-directory: src/github.com/nats-io/nats-server

- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
file: src/github.com/nats-io/nats-server/coverage.lcov
4 changes: 4 additions & 0 deletions scripts/cov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ mkdir cov
#
go test -v -covermode=atomic -coverprofile=./cov/conf.out ./conf -timeout=1h -tags=skip_no_race_tests
check_file "conf" "conf.out"
go test -v -covermode=atomic -coverprofile=./cov/internal.out ./internal/ldap -timeout=1h -tags=skip_no_race_tests
check_file "internal" "internal.out"
go test -v -covermode=atomic -coverprofile=./cov/log.out ./logger -timeout=1h -tags=skip_no_race_tests
check_file "logger" "log.out"
go test -v -covermode=atomic -coverprofile=./cov/server_avl.out ./server/avl -timeout=1h -tags=skip_no_race_tests
check_file "server_avl" "server_avl.out"
go test -v -covermode=atomic -coverprofile=./cov/server.out ./server -timeout=1h -tags=skip_no_race_tests
check_file "server" "server.out"
go test -v -covermode=atomic -coverprofile=./cov/test.out -coverpkg=./server ./test -timeout=1h -tags=skip_no_race_tests
Expand Down

0 comments on commit eadb19f

Please sign in to comment.