-
Notifications
You must be signed in to change notification settings - Fork 10
76 lines (71 loc) · 2.04 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# 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 }}
INTERNAL_SECONDARY: ${{ secrets.INTERNAL_SECONDARY }}
run: |
echo ${B1DDI_HOST}, ${B1DDI_API_KEY}
go test -v -cover ./b1ddi/b1ddi