-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'test-ci' into code-commit-test
- Loading branch information
Showing
1 changed file
with
8 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# 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. | ||
# | ||
# This GitHub action runs your tests for each commit push and/or PR. | ||
name: Build | ||
on: | ||
pull_request: | ||
|
@@ -20,15 +18,15 @@ jobs: | |
with: | ||
go-version: '1.18' | ||
id: go | ||
- name: Check out code into the Go module directory | ||
- 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 | ||
|
@@ -41,20 +39,18 @@ jobs: | |
go-version: '1.18' | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
- 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 | ||
timeout-minutes: 10 | ||
environment: testing | ||
needs: build | ||
steps: | ||
|
@@ -63,7 +59,7 @@ jobs: | |
with: | ||
go-version: '1.18' | ||
id: go | ||
- name: Check out code into the Go module directory | ||
- name: Check out the code into the Go module directory | ||
uses: actions/[email protected] | ||
- name: Get dependencies | ||
run: | | ||
|
@@ -74,7 +70,7 @@ jobs: | |
TF_ACC: "1" | ||
B1DDI_HOST: ${{ secrets.BLOXONE_HOST }} | ||
B1DDI_API_KEY: ${{ secrets.BLOXONE_API_KEY }} | ||
INTERNAL_SECONDARY: ${{ secrets.INTERNAL_SECONDARY }} | ||
DHCP_HOST: ${{ secrets.DHCP_HOST }} | ||
DNS_HOST: ${{ secrets.DNS_HOST }} | ||
run: | | ||
echo ${B1DDI_HOST}, ${B1DDI_API_KEY} | ||
go test -v -cover ./b1ddi/b1ddi |