@@ -5,14 +5,14 @@ name: Tests
55on :
66 pull_request :
77 paths-ignore :
8- - ' README.md'
8+ - " README.md"
99 push :
1010 paths-ignore :
11- - ' README.md'
11+ - " README.md"
1212 branches : [master]
13-
13+
1414 # For systems with an upstream API that could drift unexpectedly (like most SaaS systems, etc.),
15- # we recommend testing at a regular interval not necessarily tied to code changes. This will
15+ # we recommend testing at a regular interval not necessarily tied to code changes. This will
1616 # ensure you are alerted to something breaking due to an API change, even if the code did not
1717 # change.
1818 # schedule:
@@ -24,32 +24,31 @@ jobs:
2424 runs-on : ubuntu-latest
2525 timeout-minutes : 5
2626 steps :
27+ - name : Check out code into the Go module directory
28+ uses : actions/checkout@v3
2729
28- - name : Check out code into the Go module directory
29- uses : actions/checkout@v3
30-
31- - name : Set up Go
32- uses : actions/setup-go@v3
33- with :
34- go-version-file : ' go.mod'
35- cache : true
36- id : go
30+ - name : Set up Go
31+ uses : actions/setup-go@v3
32+ with :
33+ go-version-file : " go.mod"
34+ cache : true
35+ id : go
3736
38- - name : Get dependencies
39- run : |
40- go mod download
37+ - name : Get dependencies
38+ run : |
39+ go mod download
4140
42- - name : Build
43- run : |
44- go build -v .
41+ - name : Build
42+ run : |
43+ go build -v .
4544
4645 generate :
4746 runs-on : ubuntu-latest
4847 steps :
4948 - uses : actions/checkout@v3
5049 - uses : actions/setup-go@v3
5150 with :
52- go-version-file : ' go.mod'
51+ go-version-file : " go.mod"
5352 cache : true
5453 - name : Set up Terraform
5554 uses : hashicorp/setup-terraform@v2
7069 test :
7170 name : Matrix Test
7271 needs : build
73- runs-on : ubuntu-latest
72+ runs-on : ubuntu-latest
7473
7574 services :
7675 clickhouse :
@@ -88,54 +87,63 @@ jobs:
8887 --health-interval 15s
8988 --health-timeout 5s
9089 --health-retries 5
91-
90+
9291 timeout-minutes : 15
9392 strategy :
9493 fail-fast : false
9594 matrix :
9695 # list whatever Terraform versions here you would like to support
9796 terraform :
98- - ' 0.12.*'
99- - ' 0.13.*'
100- - ' 0.14.*'
101- - ' 0.15.*'
102- - ' 1.0.*'
103- - ' 1.1.*'
104- - ' 1.2.*'
97+ - " 0.12.*"
98+ - " 0.13.*"
99+ - " 0.14.*"
100+ - " 0.15.*"
101+ - " 1.0.*"
102+ - " 1.1.*"
103+ - " 1.2.*"
104+ - " 1.3.*"
105+ - " 1.4.*"
106+ - " 1.5.*"
107+ - " 1.6.*"
108+ - " 1.8.*"
109+ - " 1.9.*"
110+ - " 1.10.*"
111+ - " 1.11.*"
112+ - " 1.12.*"
113+ - " 1.13.*"
105114 steps :
115+ - name : Check out code into the Go module directory
116+ uses : actions/checkout@v3
106117
107- - name : Check out code into the Go module directory
108- uses : actions/checkout@v3
118+ - name : Set up Go
119+ uses : actions/setup-go@v3
120+ with :
121+ go-version-file : " go.mod"
122+ cache : true
123+ id : go
109124
110- - name : Set up Go
111- uses : actions/setup-go@v3
112- with :
113- go-version-file : ' go.mod'
114- cache : true
115- id : go
125+ - uses : hashicorp/setup-terraform@v2
126+ with :
127+ terraform_version : ${{ matrix.terraform }}
128+ terraform_wrapper : false
116129
117- - uses : hashicorp/setup-terraform@v2
118- with :
119- terraform_version : ${{ matrix.terraform }}
120- terraform_wrapper : false
130+ - name : Get dependencies
131+ run : |
132+ go mod download
121133
122- - name : Get dependencies
123- run : |
124- go mod download
125-
126- - name : TF acceptance tests
127- timeout-minutes : 10
128- env :
129- TF_ACC : " 1"
130- TF_CLICKHOUSE_HOST : " 127.0.0.1"
131- TF_CLICKHOUSE_USERNAME : " default"
132- TF_CLICKHOUSE_PASSWORD : " "
133- TF_CLICKHOUSE_PORT : " 9000"
134+ - name : TF acceptance tests
135+ timeout-minutes : 10
136+ env :
137+ TF_ACC : " 1"
138+ TF_CLICKHOUSE_HOST : " 127.0.0.1"
139+ TF_CLICKHOUSE_USERNAME : " default"
140+ TF_CLICKHOUSE_PASSWORD : " "
141+ TF_CLICKHOUSE_PORT : " 9000"
134142
135- # Set whatever additional acceptance test env vars here. You can
136- # optionally use data from your repository secrets using the
137- # following syntax:
138- # SOME_VAR: ${{ secrets.SOME_VAR }}
143+ # Set whatever additional acceptance test env vars here. You can
144+ # optionally use data from your repository secrets using the
145+ # following syntax:
146+ # SOME_VAR: ${{ secrets.SOME_VAR }}
139147
140- run : |
141- go test -v -cover -tags testing ./...
148+ run : |
149+ go test -v -cover -tags testing ./...
0 commit comments