Skip to content

Commit b7e0159

Browse files
Update build.yml
1 parent b7bed96 commit b7e0159

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ jobs:
2727
strategy:
2828
matrix:
2929
os: [ ubuntu-latest ]
30+
services:
31+
mysql:
32+
image: mysql:5.7
33+
env:
34+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
35+
MYSQL_DATABASE: test_sqlkata
36+
ports:
37+
- 3306
38+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3039
steps:
3140
- name: Checkout
3241
uses: actions/checkout@v2
@@ -46,6 +55,11 @@ jobs:
4655
run: dotnet build -c Release --no-restore
4756
- name: Test
4857
run: dotnet test -c Release
58+
env:
59+
MYSQL_HOST: 127.0.0.1
60+
MYSQL_USER: root
61+
MYSQL_DB: ${{ job.services.mysql.env.MYSQL_DATABASE }}
62+
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
4963
- name: Pack QueryBuilder
5064
if: matrix.os == 'ubuntu-latest'
5165
run: dotnet pack -v normal -c Release --no-restore --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID QueryBuilder/QueryBuilder.csproj

0 commit comments

Comments
 (0)