Skip to content

chore: sdk v0.47.10 + deps version bumps #192

chore: sdk v0.47.10 + deps version bumps

chore: sdk v0.47.10 + deps version bumps #192

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test-coverage-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.20.4
- uses: actions/checkout@v3
- name: test & coverage report creation
run: |
make test
env:
TEST_TARGET: "./..."
TEST_ARGS: "-timeout 12m -race -coverprofile=./coverage.out -covermode=atomic -v"
- name: filter out DONTCOVER
if: github.event_name == 'pull_request'
run: |
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')"
excludelist+=" $(find ./ -type f -name '*.pb.go')"
excludelist+=" $(find ./ -type f -name '*.pb.gw.go')"
excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')"
for filename in ${excludelist}; do
filename=$(echo $filename | sed 's/^./github.com\/persistenceOne\/persistence-sdk/g')
echo "Excluding ${filename} from coverage report..."
sed -i "/$(echo $filename | sed 's/\//\\\//g')/d" ./coverage.out
done
- name: Convert coverage to lcov
if: github.event_name == 'pull_request'
uses: jandelgado/gcov2lcov-action@v1
- name: Coveralls
if: github.event_name == 'pull_request'
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
- name: Code Coverage Report
if: github.event_name == 'pull_request'
uses: vebr/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-file: coverage.lcov