@@ -29,22 +29,113 @@ jobs:
2929 run : make test WITH_RACE=1
3030 - uses : codecov/codecov-action@v1
3131
32- integration-test :
32+ integration-test-mysql-5735 :
3333 runs-on : ubuntu-latest
3434 timeout-minutes : 15
3535 strategy :
3636 fail-fast : true
37+ services :
38+ mysql :
39+ image : mysql:5.7.35
40+ env :
41+ MYSQL_ALLOW_EMPTY_PASSWORD : yes
42+ ports :
43+ - 3306:3306
44+ options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3745 steps :
3846 - uses : actions/checkout@v2
47+ - name : Shutdown Ubuntu MySQL (SUDO)
48+ run : sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
3949 - name : Set up Go 1.16
4050 uses : actions/setup-go@v2
4151 with :
4252 go-version : 1.16
53+ - uses : actions/cache@v2
54+ with :
55+ path : ~/go/pkg/mod
56+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
57+ restore-keys : |
58+ ${{ runner.os }}-go-
59+ - name : Get dependencies
60+ run : go mod download
61+ - name : Download dependencies
62+ run : sh install.sh
63+ - name : Integration test
64+ run : make integration_test
65+ - name : Set up tmate session
66+ if : ${{ failure() }}
67+ uses : mxschmitt/action-tmate@v3
68+
69+ integration-test-mysql-8026 :
70+ runs-on : ubuntu-latest
71+ timeout-minutes : 15
72+ strategy :
73+ fail-fast : true
74+ services :
75+ mysql :
76+ image : mysql:8.0.26
77+ env :
78+ MYSQL_ALLOW_EMPTY_PASSWORD : yes
79+ ports :
80+ - 3306:3306
81+ options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
82+ steps :
83+ - uses : actions/checkout@v2
84+ - name : Shutdown Ubuntu MySQL (SUDO)
85+ run : sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
86+ - name : Set up Go 1.16
87+ uses : actions/setup-go@v2
88+ with :
89+ go-version : 1.16
90+ - uses : actions/cache@v2
91+ with :
92+ path : ~/go/pkg/mod
93+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
94+ restore-keys : |
95+ ${{ runner.os }}-go-
96+ - name : Get dependencies
97+ run : go mod download
98+ - name : Download dependencies
99+ run : sh install.sh
100+ - name : Integration test
101+ run : make integration_test
102+ - name : Set up tmate session
103+ if : ${{ failure() }}
104+ uses : mxschmitt/action-tmate@v3
105+
106+ integration-test-mysql-8022 :
107+ runs-on : ubuntu-latest
108+ timeout-minutes : 15
109+ strategy :
110+ fail-fast : true
111+ services :
112+ mysql :
113+ image : mysql:8.0.22
114+ env :
115+ MYSQL_ALLOW_EMPTY_PASSWORD : yes
116+ ports :
117+ - 3306:3306
118+ options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
119+ steps :
120+ - uses : actions/checkout@v2
121+ - name : Shutdown Ubuntu MySQL (SUDO)
122+ run : sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
123+ - name : Set up Go 1.16
124+ uses : actions/setup-go@v2
125+ with :
126+ go-version : 1.16
127+ - uses : actions/cache@v2
128+ with :
129+ path : ~/go/pkg/mod
130+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
131+ restore-keys : |
132+ ${{ runner.os }}-go-
133+ - name : Get dependencies
134+ run : go mod download
43135 - name : Download dependencies
44136 run : sh install.sh
45- - name : Start MySQL
46- run : |
47- sudo systemctl start mysql.service
48- mysqladmin -uroot -proot password ''
49137 - name : Integration test
50138 run : make integration_test
139+ - name : Set up tmate session
140+ if : ${{ failure() }}
141+ uses : mxschmitt/action-tmate@v3
0 commit comments