@@ -16,24 +16,24 @@ name: tests
16
16
on :
17
17
push :
18
18
branches :
19
- - ' v1 '
19
+ - " v1 "
20
20
pull_request :
21
21
pull_request_target :
22
22
types : [labeled]
23
23
24
24
jobs :
25
25
unit :
26
- # run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
26
+ # run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
27
27
if : " ${{ (github.event.action != 'labeled' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) || github.event.label.name == 'tests: run' }}"
28
28
name : unit tests
29
29
runs-on : " ubuntu-latest"
30
30
strategy :
31
31
matrix :
32
- go-version : ["1.20 ", "1.22 "]
32
+ go-version : ["1.21 ", "1.23 "]
33
33
fail-fast : false
34
34
permissions :
35
- contents : ' read'
36
- id-token : ' write'
35
+ contents : " read"
36
+ id-token : " write"
37
37
steps :
38
38
- name : Remove PR label
39
39
if : " ${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
53
53
}
54
54
55
55
- name : Checkout code
56
- uses : ' actions/checkout@v3'
56
+ uses : " actions/checkout@v3"
57
57
with :
58
58
ref : ${{ github.event.pull_request.head.sha }}
59
59
repository : ${{ github.event.pull_request.head.repo.full_name }}
63
63
with :
64
64
go-version : ${{ matrix.go-version }}
65
65
66
- - id : ' auth'
67
- name : ' Authenticate to Google Cloud'
68
- uses : ' google-github-actions/auth@v0.8.0'
66
+ - id : " auth"
67
+ name : " Authenticate to Google Cloud"
68
+ uses : " google-github-actions/auth@v0.8.0"
69
69
with :
70
70
workload_identity_provider : ${{ secrets.PROVIDER_NAME }}
71
71
service_account : ${{ secrets.SERVICE_ACCOUNT }}
87
87
./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
88
88
89
89
integration :
90
- # run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
90
+ # run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
91
91
if : " ${{ (github.event.action != 'labeled' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) || github.event.label.name == 'tests: run' }}"
92
92
name : integration tests
93
93
runs-on : ${{ matrix.os }}
96
96
os : [macos-latest, windows-latest, ubuntu-latest]
97
97
fail-fast : false
98
98
permissions :
99
- contents : ' read'
100
- id-token : ' write'
99
+ contents : " read"
100
+ id-token : " write"
101
101
steps :
102
102
- name : Remove PR label
103
103
if : " ${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
@@ -117,27 +117,27 @@ jobs:
117
117
}
118
118
119
119
- name : Checkout code
120
- uses : ' actions/checkout@v3'
120
+ uses : " actions/checkout@v3"
121
121
with :
122
122
ref : ${{ github.event.pull_request.head.sha }}
123
123
repository : ${{ github.event.pull_request.head.repo.full_name }}
124
124
125
125
- name : Setup Go
126
126
uses : actions/setup-go@v3
127
127
with :
128
- go-version : " 1.22 "
128
+ go-version : " 1.23 "
129
129
130
- - id : ' auth'
131
- name : ' Authenticate to Google Cloud'
132
- uses : ' google-github-actions/auth@v0.8.0'
130
+ - id : " auth"
131
+ name : " Authenticate to Google Cloud"
132
+ uses : " google-github-actions/auth@v0.8.0"
133
133
with :
134
134
workload_identity_provider : ${{ secrets.PROVIDER_NAME }}
135
135
service_account : ${{ secrets.SERVICE_ACCOUNT }}
136
136
access_token_lifetime : 600s
137
137
138
- - id : ' secrets'
138
+ - id : " secrets"
139
139
name : Get secrets
140
- uses : ' google-github-actions/get-secretmanager-secrets@v0.5.0'
140
+ uses : " google-github-actions/get-secretmanager-secrets@v0.5.0"
141
141
with :
142
142
secrets : |-
143
143
MYSQL_CONNECTION_NAME:${{ secrets.GOOGLE_CLOUD_PROJECT }}/MYSQL_CONNECTION_NAME
@@ -161,20 +161,20 @@ jobs:
161
161
162
162
- name : Run tests
163
163
env :
164
- GOOGLE_CLOUD_PROJECT : ' ${{ secrets.GOOGLE_CLOUD_PROJECT }}'
165
- MYSQL_CONNECTION_NAME : ' ${{ steps.secrets.outputs.MYSQL_CONNECTION_NAME }}'
166
- MYSQL_USER : ' ${{ steps.secrets.outputs.MYSQL_USER }}'
167
- MYSQL_PASS : ' ${{ steps.secrets.outputs.MYSQL_PASS }}'
168
- MYSQL_DB : ' ${{ steps.secrets.outputs.MYSQL_DB }}'
169
- POSTGRES_CONNECTION_NAME : ' ${{ steps.secrets.outputs.POSTGRES_CONNECTION_NAME }}'
170
- POSTGRES_USER : ' ${{ steps.secrets.outputs.POSTGRES_USER }}'
171
- POSTGRES_USER_IAM : ' ${{ steps.secrets.outputs.POSTGRES_USER_IAM }}'
172
- POSTGRES_PASS : ' ${{ steps.secrets.outputs.POSTGRES_PASS }}'
173
- POSTGRES_DB : ' ${{ steps.secrets.outputs.POSTGRES_DB }}'
174
- SQLSERVER_CONNECTION_NAME : ' ${{ steps.secrets.outputs.SQLSERVER_CONNECTION_NAME }}'
175
- SQLSERVER_USER : ' ${{ steps.secrets.outputs.SQLSERVER_USER }}'
176
- SQLSERVER_PASS : ' ${{ steps.secrets.outputs.SQLSERVER_PASS }}'
177
- SQLSERVER_DB : ' ${{ steps.secrets.outputs.SQLSERVER_DB }}'
164
+ GOOGLE_CLOUD_PROJECT : " ${{ secrets.GOOGLE_CLOUD_PROJECT }}"
165
+ MYSQL_CONNECTION_NAME : " ${{ steps.secrets.outputs.MYSQL_CONNECTION_NAME }}"
166
+ MYSQL_USER : " ${{ steps.secrets.outputs.MYSQL_USER }}"
167
+ MYSQL_PASS : " ${{ steps.secrets.outputs.MYSQL_PASS }}"
168
+ MYSQL_DB : " ${{ steps.secrets.outputs.MYSQL_DB }}"
169
+ POSTGRES_CONNECTION_NAME : " ${{ steps.secrets.outputs.POSTGRES_CONNECTION_NAME }}"
170
+ POSTGRES_USER : " ${{ steps.secrets.outputs.POSTGRES_USER }}"
171
+ POSTGRES_USER_IAM : " ${{ steps.secrets.outputs.POSTGRES_USER_IAM }}"
172
+ POSTGRES_PASS : " ${{ steps.secrets.outputs.POSTGRES_PASS }}"
173
+ POSTGRES_DB : " ${{ steps.secrets.outputs.POSTGRES_DB }}"
174
+ SQLSERVER_CONNECTION_NAME : " ${{ steps.secrets.outputs.SQLSERVER_CONNECTION_NAME }}"
175
+ SQLSERVER_USER : " ${{ steps.secrets.outputs.SQLSERVER_USER }}"
176
+ SQLSERVER_PASS : " ${{ steps.secrets.outputs.SQLSERVER_PASS }}"
177
+ SQLSERVER_DB : " ${{ steps.secrets.outputs.SQLSERVER_DB }}"
178
178
TMPDIR : " /tmp"
179
179
run : |
180
180
go install github.com/jstemmer/go-junit-report/v2@latest
0 commit comments