forked from MyPureCloud/terraform-provider-genesyscloud
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.23 KB
/
go-checks.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
name: Go Checks
on:
push:
paths-ignore:
- 'README.md'
jobs:
go-checks:
name: Go Checks
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
id: go
- name: Setup Terraform CLI
uses: hashicorp/[email protected]
with:
terraform_wrapper: false
terraform_version: ${{ matrix.terraform }}
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: |
go mod download
- name: Generate
run: |
go generate
if [[ -n $(git status -s) ]]; then
echo "There are untracked documentation changes:\n"
git status
fi
- name: Tidy
run: |
go mod tidy
if [[ -n $(git status -s) ]]; then
echo "go mod tidy produced changes:\n"
git status
fi
- name: Vet
run: |
if [[ -n $(go vet ./genesyscloud/... 2>&1) ]]; then
echo "go vet highlighted the following:\n"
go vet ./genesyscloud/...
exit 1
fi