-
Notifications
You must be signed in to change notification settings - Fork 34
49 lines (40 loc) · 1.1 KB
/
go.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
43
44
45
46
47
48
name: Go
on:
push:
branches:
- master
pull_request:
jobs:
test:
strategy:
matrix:
go: [ 1.21.0 ]
grafana: [ 8.5.22, 9.4.3, 10.1.4 ]
env:
GRAFANA_INTEGRATION: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Verify go version
run: go version
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Calc coverage
if: "${{ matrix.go == '1.21.0' && matrix.grafana == '10.1.4' }}"
run: |
go test -v -covermode=atomic -coverprofile=coverage.out ./...
- name: Convert coverage.out to coverage.lcov
if: "${{ matrix.go == '1.21.0' && matrix.grafana == '10.1.4' }}"
uses: jandelgado/[email protected]
- name: Test
if: "${{ matrix.grafana != '10.1.4' }}"
run: go test -v ./...