-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (36 loc) · 1.07 KB
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Coverage
on: [push, pull_request]
jobs:
codecov:
name: codecov
runs-on: ubuntu-latest
services:
minio:
# edge-cicd is a modified image that doesn't require us to pass the `server` command when running the container.
image: minio/minio:edge-cicd
options: >-
--health-cmd "curl http://localhost:9000/minio/health/live"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 19000:9000
steps:
- uses: actions/checkout@v4
- name: Load .env file
uses: cardinalby/export-env-action@v2
with:
envFile: .env
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
cache: false
- name: Generate coverage report
run: |
go test -race ./... -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage report
uses: codecov/codecov-action@v2
with:
file: ./coverage.txt
flags: unittests
name: codecov-umbrella