-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (36 loc) · 1.2 KB
/
unittest.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
name: Run unittests for go plugin
on:
push:
pull_request:
types: [synchronize]
jobs:
test:
strategy:
fail-fast: false
matrix:
go-version:
- 1.18.x
- 1.19.x
- 1.20.x
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Install Python plugin dependencies
run: python3 -m pip install funppy
- name: Checkout code
uses: actions/checkout@v2
- name: Run coverage
run: go test -coverprofile="cover.out" -covermode=atomic -race ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
name: hrp plugin # User defined upload name. Visible in Codecov UI
token: ${{ secrets.CODECOV_TOKEN }} # Repository upload token
file: ./cover.out # Path to coverage file to upload
flags: unittests # Flag upload to group coverage metrics
fail_ci_if_error: true # Specify whether or not CI build should fail if Codecov runs into an error during upload
verbose: true