Code commit test #14
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
# This GitHub action runs your tests for each commit push and/or PR. Optionally | |
# you can turn it on using a cron schedule for regular testing. | |
# | |
name: Build | |
on: | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
- 'docs/**' | |
jobs: | |
# ensure the code builds... | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Setup Go 1.18 | |
uses: actions/[email protected] | |
with: | |
go-version: '1.18' | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/[email protected] | |
- name: Get dependencies | |
run: | | |
go mod download | |
- name: Build | |
run: | | |
go build -v ./b1ddi/b1ddi | |
lint: | |
name: Go Linter | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
needs: build | |
steps: | |
- name: Setup Go 1.18 | |
uses: actions/[email protected] | |
with: | |
go-version: '1.18' | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/[email protected] | |
# Run go lint on the code | |
- name: Run go lint | |
run: | | |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2 | |
golangci-lint run | |
tests: | |
name: Terraform acceptance tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
needs: build | |
steps: | |
- name: Setup Go 1.18 | |
uses: actions/[email protected] | |
with: | |
go-version: '1.18' | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/[email protected] | |
- name: Get dependencies | |
run: | | |
go mod download | |
- name: Run tests | |
timeout-minutes: 10 | |
env: | |
TF_ACC: "1" | |
B1DDI_HOST: ${{ secrets.BLOXONE_HOST }} | |
B1DDI_API_KEY: ${{ secrets.BLOXONE_API_KEY }} | |
INTERNAL_SECONDARY: ${{ secrets.INTERNAL_SECONDARY }} | |
run: | | |
go test -v -cover ./b1ddi/b1ddi |