Skip to content

Commit 238463f

Browse files
Merge branch 'master' into master
2 parents 5271463 + 50382fa commit 238463f

File tree

91 files changed

+1822
-587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1822
-587
lines changed

.all-contributorsrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"files": [
3+
"README.md"
4+
],
5+
"imageSize": 100,
6+
"commit": false,
7+
"contributors": [
8+
{
9+
"login": "mnsrulz",
10+
"name": "mnsrulz",
11+
"avatar_url": "https://avatars.githubusercontent.com/u/1809086?v=4",
12+
"profile": "https://github.com/mnsrulz",
13+
"contributions": [
14+
"code"
15+
]
16+
}
17+
],
18+
"contributorsPerLine": 7,
19+
"projectName": "querybuilder",
20+
"projectOwner": "sqlkata",
21+
"repoType": "github",
22+
"repoHost": "https://github.com",
23+
"skipCi": true
24+
}

.editorconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
# Note: the trim_trailing_whitespace option is br0ken in visualstudio, it
7+
# simply does not follow the EditorConfig specification. Therefor you are
8+
# strongly encouraged to not rely on this setting alone, but please install
9+
# the following extension too: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespaceVisualizer
10+
#
11+
# References:
12+
# https://developercommunity.visualstudio.com/t/EditorConfig:-trim_trailing_whitespace-d/1240174?space=8&q=trim_trailing_whitespace
13+
# https://developercommunity.visualstudio.com/t/editorconfig-trim_trailing_whitespace-on/134457?space=8&q=trim_trailing_whitespace
14+
# https://developercommunity.visualstudio.com/t/trim_trailing_whitespace-in-editorconfi/1351034?space=8&q=trim_trailing_whitespace
15+
# https://developercommunity.visualstudio.com/t/BUG:-editorconfig-trim_trailing_whitespa/953937?space=8&q=trim_trailing_whitespace
16+
trim_trailing_whitespace = true
17+
insert_final_newline = true
18+
indent_style = tab
19+
indent_size = 2
20+
21+
22+
[*.cs] # To match existing style
23+
indent_style = space
24+
indent_size = 4
25+
26+
27+
[*.yml]
28+
indent_style = space

.github/workflows/build.yml

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ env:
1212
DOTNET_CLI_TELEMETRY_OPTOUT: true
1313
# Project name to pack and publish
1414
PROJECT_NAME: SqlKata
15-
DOTNET_VERSION: 5.0.201
15+
DOTNET_VERSION: 6.0.202
16+
# DOTNET_VERSION: 5.0.201
1617
# DOTNET_VERSION: 2.2.203
1718
# GitHub Packages Feed settings
1819
GITHUB_FEED: https://nuget.pkg.github.com/sqlkata/
@@ -21,37 +22,71 @@ env:
2122
# Official NuGet Feed settings
2223
NUGET_FEED: https://api.nuget.org/v3/index.json
2324
NUGET_KEY: ${{ secrets.NUGET_KEY }}
25+
26+
DB_MYSQL_DATABASE: test_sqlkata
27+
DB_MYSQL_USER: root
28+
DB_MYSQL_PASSWORD: 'root'
29+
DB_MYSQL_HOST: localhost
30+
2431
jobs:
2532
build:
2633
runs-on: ${{ matrix.os }}
2734
strategy:
2835
matrix:
29-
os: [ ubuntu-latest ]
36+
os: [ubuntu-latest]
3037
steps:
3138
- name: Checkout
3239
uses: actions/checkout@v2
40+
41+
- name: Set env
42+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
43+
44+
- name: Checking release
45+
run: |
46+
echo $RELEASE_VERSION
47+
echo ${{ env.RELEASE_VERSION }}
48+
3349
- name: Setup .NET Core
3450
uses: actions/setup-dotnet@v1
3551
with:
3652
dotnet-version: ${{ env.DOTNET_VERSION }}
53+
3754
- name: Restore
3855
run: dotnet restore
56+
3957
- name: Build
4058
run: dotnet build -c Release --no-restore
59+
60+
- name: Start MySql
61+
run: |
62+
sudo /etc/init.d/mysql start
63+
mysqladmin -u ${{ env.DB_MYSQL_USER }} -p${{ env.DB_MYSQL_PASSWORD }} password ''
64+
mysql -e 'CREATE DATABASE ${{ env.DB_MYSQL_DATABASE }};' -u${{ env.DB_MYSQL_USER }}
65+
mysql -e 'CREATE TABLE cars(id int primary key auto_increment);' -u${{ env.DB_MYSQL_USER }} ${{ env.DB_MYSQL_DATABASE }}
66+
mysql -e 'SHOW TABLES;' -u${{ env.DB_MYSQL_USER }} ${{ env.DB_MYSQL_DATABASE }}
67+
4168
- name: Test
4269
run: dotnet test -c Release
70+
env:
71+
SQLKATA_MYSQL_HOST: ${{ env.DB_MYSQL_HOST }}
72+
SQLKATA_MYSQL_USER: ${{ env.DB_MYSQL_USER }}
73+
SQLKATA_MYSQL_DB: ${{ env.DB_MYSQL_DATABASE }}
74+
4375
- name: Pack QueryBuilder
4476
if: matrix.os == 'ubuntu-latest'
45-
run: dotnet pack -v normal -c Release --no-restore --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID QueryBuilder/QueryBuilder.csproj
77+
run: dotnet pack -v normal -c Release --no-restore --include-symbols --include-source --version-suffix=$GITHUB_RUN_ID QueryBuilder/QueryBuilder.csproj
78+
4679
- name: Pack SqlKata.Execution
4780
if: matrix.os == 'ubuntu-latest'
48-
run: dotnet pack -v normal -c Release --no-restore --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID SqlKata.Execution/SqlKata.Execution.csproj
81+
run: dotnet pack -v normal -c Release --no-restore --include-symbols --include-source --version-suffix=$GITHUB_RUN_ID SqlKata.Execution/SqlKata.Execution.csproj
82+
4983
- name: Upload QueryBuilder Artifact
5084
if: matrix.os == 'ubuntu-latest'
5185
uses: actions/upload-artifact@v2
5286
with:
5387
name: nupkg
5488
path: ./QueryBuilder/bin/Release/*.nupkg
89+
5590
- name: Upload SqlKata.Execution Artifact
5691
if: matrix.os == 'ubuntu-latest'
5792
uses: actions/upload-artifact@v2
@@ -94,16 +129,16 @@ jobs:
94129
echo Version: $VERSION
95130
VERSION="${VERSION//v}"
96131
echo Clean Version: $VERSION
97-
dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg QueryBuilder/QueryBuilder.csproj
132+
dotnet pack -v normal -c Release --include-symbols --include-source -p:Version=$VERSION -p:PackageVersion=$VERSION -o nupkg QueryBuilder/QueryBuilder.csproj
98133
- name: Create Release NuGet package (SqlKata.Execution)
99134
run: |
100135
arrTag=(${GITHUB_REF//\// })
101136
VERSION="${arrTag[2]}"
102137
echo Version: $VERSION
103138
VERSION="${VERSION//v}"
104139
echo Clean Version: $VERSION
105-
dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg SqlKata.Execution/SqlKata.Execution.csproj
140+
dotnet pack -v normal -c Release --include-symbols --include-source -p:Version=$VERSION -p:PackageVersion=$VERSION -o nupkg SqlKata.Execution/SqlKata.Execution.csproj
106141
- name: Push to GitHub Feed
107142
run: dotnet nuget push ./nupkg/*.nupkg --skip-duplicate --source $GITHUB_FEED --api-key $GITHUB_TOKEN
108143
- name: Push to NuGet Feed
109-
run: dotnet nuget push ./nupkg/*.nupkg --skip-duplicate --source $NUGET_FEED --api-key $NUGET_KEY
144+
run: dotnet nuget push ./nupkg/*.nupkg --skip-duplicate --source $NUGET_FEED --api-key $NUGET_KEY

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
"processId": "${command:pickProcess}"
2626
}
2727
,]
28-
}
28+
}

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"problemMatcher": "$msCompile"
1313
}
1414
]
15-
}
15+
}

0 commit comments

Comments
 (0)