File tree Expand file tree Collapse file tree 2 files changed +149
-94
lines changed
Expand file tree Collapse file tree 2 files changed +149
-94
lines changed Original file line number Diff line number Diff line change 1+ name : Todo tests
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+
9+ jobs :
10+
11+ build :
12+ runs-on : ubuntu-latest
13+ services :
14+ mysql :
15+ image : mysql:5.7.37
16+ env :
17+ MYSQL_ROOT_PASSWORD : ' yourpassword'
18+ MYSQL_DATABASE : ' my_apijson'
19+ ports :
20+ - 3306:3306
21+ options : >-
22+ --health-cmd="mysqladmin ping"
23+ --health-interval=10s
24+ --health-timeout=5s
25+ --health-retries=3
26+ steps :
27+ - uses : actions/checkout@v3
28+
29+ - name : Set up Go
30+ uses : actions/setup-go@v3
31+ with :
32+ go-version : 1.18
33+
34+
35+
36+ - name : Test
37+ run : |
38+
39+ cat demo/todo/doc/todo.sql
40+ mysql -uroot -h 127.0.0.1 --port 3306 -pyourpassword my_apijson < demo/todo/doc/todo.sql
41+
42+ cd ./demo/todo
43+ mv config.yaml.example config.yaml
44+ cat config.yaml
45+
46+ cd tests
47+ go test -v
You can’t perform that action at this time.
0 commit comments