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 88jobs :
99 test :
1010 runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ database : [postgres, mysql]
1114 services :
1215 postgres :
1316 image : postgres:latest
2326 --health-timeout 5s
2427 --health-retries 5
2528
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+
2642 steps :
2743 - name : Checkout code
2844 uses : actions/checkout@v3
3551 - name : Install dependencies
3652 run : npm install
3753
38- - name : Run tests
54+ - name : Run PostgreSQL tests
55+ if : matrix.database == 'postgres'
3956 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 77jobs :
88 test :
99 runs-on : ubuntu-latest
10+ strategy :
11+ matrix :
12+ database : [postgres, mysql]
1013 services :
1114 postgres :
1215 image : postgres:latest
2225 --health-timeout 5s
2326 --health-retries 5
2427
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+
2541 steps :
2642 - name : Checkout code
2743 uses : actions/checkout@v3
3450 - name : Install dependencies
3551 run : npm install
3652
37- - name : Run tests
53+ - name : Run PostgreSQL tests
54+ if : matrix.database == 'postgres'
3855 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