forked from instill-ai/component
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.03 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
permissions:
contents: read
pull-requests: write
steps:
- name: Install operator dependencies
run: sudo apt-get update -y && sudo apt-get install poppler-utils wv unrtf tidy tesseract-ocr libtesseract-dev -y
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Load .env file
uses: cardinalby/export-env-action@v2
with:
envFile: .env
expand: true
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GOLANG_VERSION }}
- uses: actions/checkout@v3
- name: Generate coverage report
run: |
go mod tidy
go test -tags ocr -race ./... -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage report
uses: codecov/codecov-action@v2
with:
file: ./coverage.txt
flags: unittests
name: codecov-umbrella