Skip to content

Fixes

Fixes #57

Workflow file for this run

name: "Coveralls.io"
on:
push:
branches: [ "v2" ]
pull_request:
branches: [ "v2" ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '.*/'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
go:
- '1.20'
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
- run: go mod tidy
- name: Get targets
run: |
echo "::set-output name=list::$(go list ./... | grep -v /internal | grep -v /legacy | sed -r 's/github.com\/tawesoft\/golib\/v2\///g' | xargs printf -- './%s ' | xargs)"
id: test_targets
- run: mkdir -p .tmp/coverage
- run: go test -timeout 1m -v -race -coverprofile .tmp/coverage/profile.cov ${{ steps.test_targets.outputs.list }}
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: .tmp/coverage/profile.cov
flag-name: Go-${{ matrix.go }}
parallel: true
# notifies that all test jobs are finished.
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true