Added support to send a User-Agent header with current Terraform Provider Version to Instana #46
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: Build, Test and Verify | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20.0' | |
- name: Set up gotestfmt | |
uses: gotesttools/gotestfmt-action@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get version number | |
id: get_version | |
run: echo ::set-output name=VERSION::$(git describe --tags --match "v*" --always --dirty) | |
- name: Run build | |
run: go build . | |
- name: golangci-lint | |
uses: gessnerfl/golangci-lint-action@master | |
continue-on-error: true | |
with: | |
skip-cache: true | |
output-file: checkstyle:golangci-lint-report.xml | |
- name: Run testing | |
run: | | |
set -euo pipefail | |
go test -json -v ./... -cover -coverprofile=coverage.out 2>&1 | tee unit-test-report.json | gotestfmt | |
set +euo pipefail | |
- name: Upload test log | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: unit-test-report | |
path: unit-test-report.json | |
if-no-files-found: error | |
# - name: Run sonar | |
# uses: sonarsource/sonarcloud-github-action@master | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
# SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
# with: | |
# args: > | |
# -Dsonar.projectVersion=${{ steps.get_version.outputs.VERSION }} |