Skip to content

Add unit test for fetch.go #1532

Add unit test for fetch.go

Add unit test for fetch.go #1532

name: Coverage Report
on:
- push
- pull_request
- release
jobs:
TestAndReport:
runs-on: ubuntu-20.04
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19.x
- uses: actions/checkout@v3.6.0
- name: Test
run: |
go test ./... -coverprofile coverage.out
- name: Report
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.out --force-coverage-parser go
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true