Skip to content

Commit 8cddf3f

Browse files
ACTION: upgrade mysql and create db from cli
1 parent 4486be6 commit 8cddf3f

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
# Project name to pack and publish
1414
PROJECT_NAME: SqlKata
1515
DOTNET_VERSION: 6.0.202
16-
# DOTNET_VERSION: 5.0.201
16+
# DOTNET_VERSION: 5.0.201
1717
# DOTNET_VERSION: 2.2.203
1818
# GitHub Packages Feed settings
1919
GITHUB_FEED: https://nuget.pkg.github.com/sqlkata/
@@ -27,52 +27,65 @@ jobs:
2727
runs-on: ${{ matrix.os }}
2828
strategy:
2929
matrix:
30-
os: [ ubuntu-latest ]
30+
os: [ubuntu-latest]
3131
services:
3232
mysql:
33-
image: mysql:5.7
34-
env:
35-
MYSQL_ALLOW_EMPTY_PASSWORD: yes
36-
MYSQL_DATABASE: test_sqlkata
37-
ports:
38-
- 3306
39-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
33+
image: mysql:8.0
34+
env:
35+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
36+
MYSQL_DATABASE: test_sqlkata
37+
ports:
38+
- 3306
39+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
4040
steps:
4141
- name: Checkout
4242
uses: actions/checkout@v2
43+
4344
- name: Set env
4445
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
46+
4547
- name: Checking release
4648
run: |
4749
echo $RELEASE_VERSION
4850
echo ${{ env.RELEASE_VERSION }}
51+
4952
- name: Setup .NET Core
5053
uses: actions/setup-dotnet@v1
5154
with:
5255
dotnet-version: ${{ env.DOTNET_VERSION }}
56+
5357
- name: Restore
5458
run: dotnet restore
59+
5560
- name: Build
5661
run: dotnet build -c Release --no-restore
62+
63+
- name: Test
64+
run: mysql -h 127.0.0.1 --port 3306 -u root -e 'CREATE DATABASE IF NOT EXISTS test_sqlkata;'
65+
5766
- name: Test
5867
run: dotnet test -c Release
5968
env:
6069
MYSQL_HOST: 127.0.0.1
6170
MYSQL_USER: root
6271
MYSQL_DB: test_sqlkata
63-
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
72+
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
73+
6474
- name: Pack QueryBuilder
6575
if: matrix.os == 'ubuntu-latest'
6676
run: dotnet pack -v normal -c Release --no-restore --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID QueryBuilder/QueryBuilder.csproj
77+
6778
- name: Pack SqlKata.Execution
6879
if: matrix.os == 'ubuntu-latest'
6980
run: dotnet pack -v normal -c Release --no-restore --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID SqlKata.Execution/SqlKata.Execution.csproj
81+
7082
- name: Upload QueryBuilder Artifact
7183
if: matrix.os == 'ubuntu-latest'
7284
uses: actions/upload-artifact@v2
7385
with:
7486
name: nupkg
7587
path: ./QueryBuilder/bin/Release/*.nupkg
88+
7689
- name: Upload SqlKata.Execution Artifact
7790
if: matrix.os == 'ubuntu-latest'
7891
uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)