1
1
name : Check
2
2
on : [ pull_request, push ]
3
3
jobs :
4
- mysql :
4
+ mysql5_7 :
5
5
runs-on : ubuntu-latest
6
6
# push: always run.
7
7
# pull_request: run only when the PR is submitted from a forked repository, not within this repository.
@@ -13,34 +13,88 @@ jobs:
13
13
image : mysql:5.7
14
14
options : --health-cmd "mysqladmin ping -h localhost" --health-interval 20s --health-timeout 10s --health-retries 10
15
15
ports :
16
- - " 3306:3306"
16
+ - " 3306:3306"
17
17
env :
18
18
MYSQL_ROOT_PASSWORD : root
19
19
MYSQL_USER : ci
20
20
MYSQL_PASSWORD : password
21
21
steps :
22
- - uses : actions/checkout@v3
23
- - name : Set up JDK 8
24
- uses : actions/setup-java@v3
25
- with :
26
- java-version : 8
27
- distribution : ' temurin'
28
- cache : " gradle"
29
- - name : Connect
30
- run : mysql -h 127.0.0.1 --port 3306 -uroot -proot -e "show databases;"
31
- - name : Create database
32
- run : mysql -h 127.0.0.1 --port 3306 -uroot -proot -e "create database ci_test;"
33
- - name : Build with testing
34
- run : ./gradlew --stacktrace :embulk-output-mysql:check
22
+ - uses : actions/checkout@v4
23
+ - name : Set up JDK 8
24
+ uses : actions/setup-java@v4
25
+ with :
26
+ java-version : 8
27
+ distribution : " zulu"
28
+ cache : " gradle"
29
+ - name : Connect
30
+ run : mysql -h 127.0.0.1 --port 3306 -uroot -proot -e "show databases;"
31
+ - name : Create database
32
+ run : mysql -h 127.0.0.1 --port 3306 -uroot -proot -e "create database ci_test;"
33
+ - name : Build with testing
34
+ run : ./gradlew --stacktrace :embulk-output-mysql:check
35
+ env :
36
+ _JAVA_OPTIONS : " -Xmx2048m -Xms512m"
37
+ EMBULK_OUTPUT_MYSQL_TEST_CONFIG : " ${{ github.workspace }}/ci/mysql.yml"
38
+ - uses : actions/upload-artifact@v4
39
+ if : always()
40
+ with :
41
+ name : mysql5_7
42
+ path : embulk-output-mysql/build/reports/tests/test
43
+ mysql8_3 :
44
+ runs-on : ubuntu-latest
45
+ # push: always run.
46
+ # pull_request: run only when the PR is submitted from a forked repository, not within this repository.
47
+ if : github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
48
+ strategy :
49
+ fail-fast : false
50
+ services :
51
+ mysql :
52
+ # Testing with MySQL 8.3 here, neither with 8.4 nor 9.0, because
53
+ # MySQL 8.4 has disabled mysql_native_password by default.
54
+ # Connector/J 5.x cannot connect to MySQL 8.4 due to this.
55
+ # TODO: Start testing with MySQL 8.4 and/or 9.0 with Connector/J 8.x.
56
+ image : mysql:8.3
57
+ options : --health-cmd "mysqladmin ping -h localhost" --health-interval 20s --health-timeout 10s --health-retries 10
58
+ ports :
59
+ - " 3306:3306"
35
60
env :
36
- _JAVA_OPTIONS : " -Xmx2048m -Xms512m"
37
- EMBULK_OUTPUT_MYSQL_TEST_CONFIG : " ${{ github.workspace }}/ci/mysql.yml"
38
- - uses : actions/upload-artifact@v3
39
- if : always()
40
- with :
41
- name : mysql
42
- path : embulk-output-mysql/build/reports/tests/test
43
- postgresql :
61
+ MYSQL_ROOT_PASSWORD : root
62
+ MYSQL_USER : ci
63
+ MYSQL_PASSWORD : password
64
+ steps :
65
+ - uses : actions/checkout@v4
66
+ - name : Set up JDK 8
67
+ uses : actions/setup-java@v4
68
+ with :
69
+ java-version : 8
70
+ distribution : " zulu"
71
+ cache : " gradle"
72
+ - name : Connect
73
+ run : mysql -h 127.0.0.1 --port 3306 -uroot -proot -e "show databases;"
74
+ - name : show version
75
+ run : mysql -h 127.0.0.1 --port 3306 -uroot -proot -e "select version();"
76
+ - name : Create database
77
+ run : mysql -h 127.0.0.1 --port 3306 -uroot -proot -e "create database ci_test;"
78
+ # Workaround to change MySQL's password mechanism to `mysql_native_password`
79
+ # from `caching_sha2_password` that is the default in MySQL 8 because
80
+ # Connector/J 5.x does not support `caching_sha2_password`.
81
+ # See: https://dev.mysql.com/doc/refman/8.4/en/account-names.html
82
+ # TODO: Start testing with `caching_sha2_password` with Connector/J 8.x.
83
+ - name : Change password (root@localhost)
84
+ run : mysql -h 127.0.0.1 --port 3306 -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';"
85
+ - name : Change password (root@%)
86
+ run : mysql -h 127.0.0.1 --port 3306 -uroot -proot -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';"
87
+ - name : Build with testing
88
+ run : ./gradlew --stacktrace :embulk-output-mysql:check
89
+ env :
90
+ _JAVA_OPTIONS : " -Xmx2048m -Xms512m"
91
+ EMBULK_OUTPUT_MYSQL_TEST_CONFIG : " ${{ github.workspace }}/ci/mysql.yml"
92
+ - uses : actions/upload-artifact@v4
93
+ if : always()
94
+ with :
95
+ name : mysql8_3
96
+ path : embulk-output-mysql/build/reports/tests/test
97
+ postgresql9_4 :
44
98
runs-on : ubuntu-latest
45
99
# push: always run.
46
100
# pull_request: run only when the PR is submitted from a forked repository, not within this repository.
@@ -56,31 +110,79 @@ jobs:
56
110
env :
57
111
POSTGRES_PASSWORD : postgres
58
112
steps :
59
- - uses : actions/checkout@v3
60
- - name : Set up JDK 8
61
- uses : actions/setup-java@v3
62
- with :
63
- java-version : 8
64
- distribution : ' temurin'
65
- cache : " gradle"
66
- - name : Connect
67
- run : psql -h 127.0.0.1 -p 5432 -U postgres -d postgres -c "\l"
68
- env :
69
- PGPASSWORD : postgres
70
- - name : Create database
71
- run : psql -h 127.0.0.1 -p 5432 -U postgres -d postgres -c "create database ci_test;"
72
- env :
73
- PGPASSWORD : postgres
74
- - name : Build with testing
75
- run : ./gradlew --stacktrace :embulk-output-postgresql:check
113
+ - uses : actions/checkout@v4
114
+ - name : Set up JDK 8
115
+ uses : actions/setup-java@v4
116
+ with :
117
+ java-version : 8
118
+ distribution : " zulu"
119
+ cache : " gradle"
120
+ - name : Connect
121
+ run : psql -h 127.0.0.1 -p 5432 -U postgres -d postgres -c "\l"
122
+ env :
123
+ PGPASSWORD : postgres
124
+ - name : Create database
125
+ run : psql -h 127.0.0.1 -p 5432 -U postgres -d postgres -c "create database ci_test;"
126
+ env :
127
+ PGPASSWORD : postgres
128
+ - name : Build with testing
129
+ run : ./gradlew --stacktrace :embulk-output-postgresql:check
130
+ env :
131
+ _JAVA_OPTIONS : " -Xmx2048m -Xms512m"
132
+ EMBULK_OUTPUT_POSTGRESQL_TEST_CONFIG : " ${{ github.workspace }}/ci/postgresql.yml"
133
+ - uses : actions/upload-artifact@v4
134
+ if : always()
135
+ with :
136
+ name : postgresql9_4
137
+ path : embulk-output-postgresql/build/reports/tests/test
138
+ # Testing with PostgreSQL 13 here, not with PostgreSQL 14 or later, because
139
+ # it raises an exception: "The authentication type 10 is not supported."
140
+ # TODO: Start testing with PostgreSQL 14 or later.
141
+ postgresql13 :
142
+ runs-on : ubuntu-latest
143
+ # push: always run.
144
+ # pull_request: run only when the PR is submitted from a forked repository, not within this repository.
145
+ if : github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
146
+ strategy :
147
+ fail-fast : false
148
+ services :
149
+ postgres :
150
+ image : postgres:13
151
+ options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
152
+ ports :
153
+ - " 5432:5432"
76
154
env :
77
- _JAVA_OPTIONS : " -Xmx2048m -Xms512m"
78
- EMBULK_OUTPUT_POSTGRESQL_TEST_CONFIG : " ${{ github.workspace }}/ci/postgresql.yml"
79
- - uses : actions/upload-artifact@v3
80
- if : always()
81
- with :
82
- name : postgresql
83
- path : embulk-output-postgresql/build/reports/tests/test
155
+ POSTGRES_PASSWORD : postgres
156
+ steps :
157
+ - uses : actions/checkout@v4
158
+ - name : Set up JDK 8
159
+ uses : actions/setup-java@v4
160
+ with :
161
+ java-version : 8
162
+ distribution : " zulu"
163
+ cache : " gradle"
164
+ - name : Connect
165
+ run : psql -h 127.0.0.1 -p 5432 -U postgres -d postgres -c "\l"
166
+ env :
167
+ PGPASSWORD : postgres
168
+ - name : Show version
169
+ run : psql -h 127.0.0.1 -p 5432 -U postgres -d postgres -c "select * from version();"
170
+ env :
171
+ PGPASSWORD : postgres
172
+ - name : Create database
173
+ run : psql -h 127.0.0.1 -p 5432 -U postgres -d postgres -c "create database ci_test;"
174
+ env :
175
+ PGPASSWORD : postgres
176
+ - name : Build with testing
177
+ run : ./gradlew --stacktrace :embulk-output-postgresql:check
178
+ env :
179
+ _JAVA_OPTIONS : " -Xmx2048m -Xms512m"
180
+ EMBULK_OUTPUT_POSTGRESQL_TEST_CONFIG : " ${{ github.workspace }}/ci/postgresql.yml"
181
+ - uses : actions/upload-artifact@v4
182
+ if : always()
183
+ with :
184
+ name : postgresql13
185
+ path : embulk-output-postgresql/build/reports/tests/test
84
186
redshift :
85
187
runs-on : ubuntu-latest
86
188
# push: always run.
@@ -98,46 +200,46 @@ jobs:
98
200
env :
99
201
POSTGRES_PASSWORD : postgres
100
202
steps :
101
- - uses : actions/checkout@v3
102
- - name : Set up JDK 8
103
- uses : actions/setup-java@v3
104
- with :
105
- java-version : 8
106
- distribution : ' temurin '
107
- cache : " gradle"
108
- - name : Connect
109
- run : psql -h 127.0.0.1 -p 5439 -U postgres -d postgres -c "\l"
110
- env :
111
- PGPASSWORD : postgres
112
- - name : Create database
113
- run : psql -h 127.0.0.1 -p 5439 -U postgres -d postgres -c "create database ci_test;"
114
- env :
115
- PGPASSWORD : postgres
116
- - name : Build with testing
117
- run : ./gradlew --stacktrace :embulk-output-redshift:check
118
- env :
119
- _JAVA_OPTIONS : " -Xmx2048m -Xms512m"
120
- EMBULK_OUTPUT_REDSHIFT_TEST_CONFIG : " ${{ github.workspace }}/ci/redshift.yml"
121
- - uses : actions/upload-artifact@v3
122
- if : always()
123
- with :
124
- name : redshift
125
- path : embulk-output-redshift/build/reports/tests/test
126
- if-no-files-found : ignore
127
- sqlserver :
203
+ - uses : actions/checkout@v4
204
+ - name : Set up JDK 8
205
+ uses : actions/setup-java@v4
206
+ with :
207
+ java-version : 8
208
+ distribution : " zulu "
209
+ cache : " gradle"
210
+ - name : Connect
211
+ run : psql -h 127.0.0.1 -p 5439 -U postgres -d postgres -c "\l"
212
+ env :
213
+ PGPASSWORD : postgres
214
+ - name : Create database
215
+ run : psql -h 127.0.0.1 -p 5439 -U postgres -d postgres -c "create database ci_test;"
216
+ env :
217
+ PGPASSWORD : postgres
218
+ - name : Build with testing
219
+ run : ./gradlew --stacktrace :embulk-output-redshift:check
220
+ env :
221
+ _JAVA_OPTIONS : " -Xmx2048m -Xms512m"
222
+ EMBULK_OUTPUT_REDSHIFT_TEST_CONFIG : " ${{ github.workspace }}/ci/redshift.yml"
223
+ - uses : actions/upload-artifact@v4
224
+ if : always()
225
+ with :
226
+ name : redshift
227
+ path : embulk-output-redshift/build/reports/tests/test
228
+ if-no-files-found : ignore
229
+ sqlserver : # TODO: Use https://hub.docker.com/_/microsoft-mssql-server
128
230
runs-on : ubuntu-latest
129
231
# push: always run.
130
232
# pull_request: run only when the PR is submitted from a forked repository, not within this repository.
131
233
if : github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
132
234
strategy :
133
235
fail-fast : false
134
236
steps :
135
- - uses : actions/checkout@v3
136
- - name : Set up JDK 8
137
- uses : actions/setup-java@v3
138
- with :
139
- java-version : 8
140
- distribution : ' temurin '
141
- cache : " gradle"
142
- - name : Build-only
143
- run : ./gradlew --stacktrace :embulk-output-sqlserver:compileJava :embulk-output-sqlserver:compileTestJava
237
+ - uses : actions/checkout@v4
238
+ - name : Set up JDK 8
239
+ uses : actions/setup-java@v4
240
+ with :
241
+ java-version : 8
242
+ distribution : " zulu "
243
+ cache : " gradle"
244
+ - name : Build-only
245
+ run : ./gradlew --stacktrace :embulk-output-sqlserver:compileJava :embulk-output-sqlserver:compileTestJava
0 commit comments