Adding support for a homebrew #520
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go: [ {version: 1.21.3, token: 1}, {version: 1.21.3, token: 0}] | |
grafana: [ 10.1.4 ] | |
env: | |
GRAFANA_INTEGRATION: 1 | |
TEST_TOKEN_CONFIG: "${{ matrix.go.token }}" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go.version }} | |
- 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: Validate ENV Value | |
shell: bash | |
run: | | |
echo "token IS $TEST_TOKEN_CONFIG" | |
- name: Calc coverage | |
if: "${{ matrix.go.version == '1.21.3' && matrix.grafana == '10.1.4' && matrix.go.token == '0' }}" | |
run: | | |
go test -v -covermode=atomic -coverprofile=coverage.out ./... | |
- name: Convert coverage.out to coverage.lcov | |
if: "${{ matrix.go.version == '1.21.3' && matrix.grafana == '10.1.4' && matrix.go.token == '0' }}" | |
uses: jandelgado/[email protected] | |
- name: Test | |
if: "${{ matrix.go.token == '1' }}" | |
run: go test -v ./... |