diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4fe3053..17a9faf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,7 +30,29 @@ jobs: name: Tests run: | go mod tidy - go test -cover -v -failfast -p 1 $(go list ./...) + go install github.com/axw/gocov/gocov + go install github.com/AlekSi/gocov-xml + go test -cover -v -failfast -p 1 $(go list ./...) -coverprofile cover.out + gocov convert cover.out | gocov-xml > coverage.xml + if: runner.os != 'Windows' + env: + SN_SERVER: ${{ secrets.SN_SERVER }} + SN_EMAIL: ${{ secrets.SN_EMAIL }} + SN_PASSWORD: ${{ secrets.SN_PASSWORD }} + - + name: Codacy Coverage Reporter + uses: codacy/codacy-coverage-reporter-action@v1.3.0 + with: + coverage-reports: coverage.xml + if: runner.os != 'Windows' + env: + CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} + - + name: Windows Tests + run: | + go mod tidy + go test -v -failfast -p 1 $(go list ./...) + if: runner.os != 'Windows' env: SN_SERVER: ${{ secrets.SN_SERVER }} SN_EMAIL: ${{ secrets.SN_EMAIL }}