-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (69 loc) · 2.43 KB
/
test.yaml
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
name: YB Manged Terraform Provider Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
# Permission for checking out code
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
GOPRIVATE: "github.com/yugabyte/yugabytedb-managed-go-client-internal"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.23'
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: '1.1.*'
terraform_wrapper: false
- run: |
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.GO_CLIENT_SECRET }}'
git config --global url."[email protected]:".insteadOf https://github.com/
make build
make clean
name: Build provider
- run: |
make doc OS_ARCH=linux_amd64
git status -s
if [[ -n $(git status -s) ]]; then
echo "The documentation is not proper. Please ensure that your run 'make doc'"
exit 1
fi
name: Check documentation
- run: |
make fmt-check
git status -s
if [[ -n $(git status -s) ]]; then
echo "The formatting is not proper. Please ensure that your run 'make fmt'"
exit 1
fi
name: Check formatting
unit:
name: Unit Tests
runs-on: ubuntu-latest
env:
GOPRIVATE: "github.com/yugabyte/yugabytedb-managed-go-client-internal"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.23'
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: '1.1.*'
terraform_wrapper: false
- run: |
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.GO_CLIENT_SECRET }}'
git config --global url."[email protected]:".insteadOf https://github.com/
make test
name: Test provider