Removing BasicAuth requirement for Connections #485
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: | |
include: | |
- token_test: 1 | |
- token_test: 0 | |
go: [ {version: 1.21.0, token: 1}, {version: 1.20.0, 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.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.version == '1.21.0' && matrix.grafana == '10.1.4' }}" | |
uses: jandelgado/[email protected] | |
- name: Test | |
if: "${{ matrix.grafana != '10.1.4' }}" | |
run: go test -v ./... | |
- name: Test Token Auth | |
if: "${{ matrix.grafana != '10.1.4' }}" | |
run: go test -v ./... | |