Code commit test - no fork #22
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. | |
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 the 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 the 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 --max-issues-per-linter 0 --max-same-issues 0 --timeout 10m | |
tests: | |
name: Terraform acceptance tests | |
runs-on: ubuntu-latest | |
environment: testing | |
needs: build | |
steps: | |
- name: Setup Go 1.18 | |
uses: actions/[email protected] | |
with: | |
go-version: '1.18' | |
id: go | |
- name: Check out the 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 }} | |
DHCP_HOST: ${{ secrets.DHCP_HOST }} | |
DNS_HOST: ${{ secrets.DNS_HOST }} | |
run: | | |
go test -v -cover ./b1ddi/b1ddi |