Skip to content

Adding dockertest to project #433

Adding dockertest to project

Adding dockertest to project #433

Workflow file for this run

name: Go
on:
push:
branches:
- master
pull_request:
jobs:
test:
strategy:
matrix:
go: [ 1.21.0]
grafana: [ 9.4.3, 10.0.0 ]
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 == '9.4.3' }}"
run: |
go test -v -covermode=atomic -coverprofile=coverage.out ./...
- name: Convert coverage.out to coverage.lcov
if: "${{ matrix.go == '1.21.0' && matrix.grafana == '9.4.3' }}"
uses: jandelgado/[email protected]
- name: Test
if: "${{ matrix.grafana != '9.4.3' }}"
run: go test -v ./...