Skip to content

feat: use go.uber.org/mock instead of github.com/golang/mock #2215

feat: use go.uber.org/mock instead of github.com/golang/mock

feat: use go.uber.org/mock instead of github.com/golang/mock #2215

Workflow file for this run

name: codecov
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read-
jobs:
codecov:
strategy:
matrix:
go: [ 1.19 ]
os: [ ubuntu-latest ]
name: codecov
if: |
startsWith(github.event.pull_request.title, 'fix') ||
startsWith(github.event.pull_request.title, 'feat') ||
startsWith(github.event.pull_request.title, 'refactor') ||
startsWith(github.event.pull_request.title, 'perf') ||
startsWith(github.event.pull_request.title, 'test')
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
check-latest: true
- name: checkout-vanus
uses: actions/checkout@v3
- name: Generate coverage report
timeout-minutes: 5
run: |
for pkg in lib api pkg client server; do
for d in $(go list ./$pkg/... | grep -v /pkg/raft); do
go test -failfast -race -coverprofile=profile.out -covermode=atomic -timeout 300s $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done
done
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.txt # optional
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)