File tree Expand file tree Collapse file tree 2 files changed +68
-2
lines changed Expand file tree Collapse file tree 2 files changed +68
-2
lines changed Original file line number Diff line number Diff line change 8
8
jobs :
9
9
test :
10
10
runs-on : ubuntu-latest
11
+ strategy :
12
+ matrix :
13
+ database : [postgres, mysql]
11
14
services :
12
15
postgres :
13
16
image : postgres:latest
23
26
--health-timeout 5s
24
27
--health-retries 5
25
28
29
+ mysql :
30
+ image : mysql:8.0
31
+ env :
32
+ MYSQL_ROOT_PASSWORD : password
33
+ MYSQL_DATABASE : sqlkit_test
34
+ ports :
35
+ - 3306:3306
36
+ options : >-
37
+ --health-cmd "mysqladmin ping -h localhost"
38
+ --health-interval 10s
39
+ --health-timeout 5s
40
+ --health-retries 10
41
+
26
42
steps :
27
43
- name : Checkout code
28
44
uses : actions/checkout@v3
35
51
- name : Install dependencies
36
52
run : npm install
37
53
38
- - name : Run tests
54
+ - name : Run PostgreSQL tests
55
+ if : matrix.database == 'postgres'
39
56
run : npm test
57
+ env :
58
+ TEST_DB_HOST : localhost
59
+ TEST_DB_PORT : 5432
60
+ TEST_DB_NAME : tinyorm_test
61
+ TEST_DB_USER : rayhan
62
+ TEST_DB_PASSWORD : rayhan123
63
+
64
+ - name : Run MySQL tests
65
+ if : matrix.database == 'mysql'
66
+ run : npm test
67
+ env :
68
+ MYSQL_TEST_DB_HOST : localhost
69
+ MYSQL_TEST_DB_PORT : 3306
70
+ MYSQL_TEST_DB_NAME : sqlkit_test
71
+ MYSQL_TEST_DB_USER : root
72
+ MYSQL_TEST_DB_PASSWORD : password
Original file line number Diff line number Diff line change 7
7
jobs :
8
8
test :
9
9
runs-on : ubuntu-latest
10
+ strategy :
11
+ matrix :
12
+ database : [postgres, mysql]
10
13
services :
11
14
postgres :
12
15
image : postgres:latest
22
25
--health-timeout 5s
23
26
--health-retries 5
24
27
28
+ mysql :
29
+ image : mysql:8.0
30
+ env :
31
+ MYSQL_ROOT_PASSWORD : password
32
+ MYSQL_DATABASE : sqlkit_test
33
+ ports :
34
+ - 3306:3306
35
+ options : >-
36
+ --health-cmd "mysqladmin ping -h localhost"
37
+ --health-interval 10s
38
+ --health-timeout 5s
39
+ --health-retries 10
40
+
25
41
steps :
26
42
- name : Checkout code
27
43
uses : actions/checkout@v3
34
50
- name : Install dependencies
35
51
run : npm install
36
52
37
- - name : Run tests
53
+ - name : Run PostgreSQL tests
54
+ if : matrix.database == 'postgres'
38
55
run : npm test
56
+ env :
57
+ TEST_DB_HOST : localhost
58
+ TEST_DB_PORT : 5432
59
+ TEST_DB_NAME : tinyorm_test
60
+ TEST_DB_USER : rayhan
61
+ TEST_DB_PASSWORD : rayhan123
62
+
63
+ - name : Run MySQL tests
64
+ if : matrix.database == 'mysql'
65
+ run : npm test
66
+ env :
67
+ MYSQL_TEST_DB_HOST : localhost
68
+ MYSQL_TEST_DB_PORT : 3306
69
+ MYSQL_TEST_DB_NAME : sqlkit_test
70
+ MYSQL_TEST_DB_USER : root
71
+ MYSQL_TEST_DB_PASSWORD : password
You can’t perform that action at this time.
0 commit comments