-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AppVeyor now runs builds on both Windows and Linux, using the latest .Net Core SDK (3.0.100 at this time). Code coverage is only measured and published on the Windows platform, and the NuGet package is also only published from Windows.
- Loading branch information
Showing
1 changed file
with
41 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,66 @@ | ||
version: 1.0.{build} | ||
image: Visual Studio 2017 | ||
init: | ||
- cmd: '' | ||
|
||
image: | ||
- Ubuntu | ||
- Visual Studio 2019 | ||
|
||
environment: | ||
CONFIGURATION: Release | ||
nugetKey: | ||
secure: jlkQ4lJxiapfC87YZMljFZbeROpo26F7wbEB7q+xn5xWlAyfOvy/SNrji8a5uKap | ||
codecovToken: | ||
secure: tDNSMb2HRVQsJEgwVvuqY02+qgaKI3bw0LHSqplQKSPSRJNEkdCVnX352HoSht5t | ||
COVERALLS_REPO_TOKEN: | ||
secure: ntYxuZR1S4QagcvXJ+rXGhJoIw0Ln556M3h6PQEwaGr/41x+JazkKeRJ8DHzHODc | ||
build_script: | ||
- cmd: >- | ||
dotnet tool install coveralls.net --version 1.0.0 --tool-path tools | ||
|
||
|
||
# Instll coverall.net only on Windows | ||
install: | ||
- cmd: dotnet tool install coveralls.net --global --version 1.0.0 | ||
|
||
echo "tools\csmacnz.coveralls.exe --opencover -i ParserTests\coverage.opencover.xml --repoToken 4I3WBzHay1o8YwAH4xRskEHbi5w71atBP --commitBranch "%APPVEYOR_REPO_BRANCH%" --commitId "%APPVEYOR_REPO_COMMIT%" --commitAuthor "%APPVEYOR_REPO_COMMIT_AUTHOR%" --commitEmail "%APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL%" --jobId "%APPVEYOR_JOB_ID%" --useRelativePaths --basePath "%APPVEYOR_BUILD_FOLDER%" | ||
dotnet restore | ||
|
||
build_script: | ||
- ps: dotnet build -c $env:CONFIGURATION | ||
|
||
dotnet build -c Release | ||
|
||
after_build: | ||
- ps: dotnet pack -c $env:CONFIGURATION sly | ||
|
||
|
||
# Run coverage on Windows | ||
test_script: | ||
- sh: dotnet test -c $CONFIGURATION --no-build | ||
- cmd: dotnet test -c %CONFIGURATION% --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:exclude=\"[while]*,[expressionParser]*,[GenericLexerWithCallbacks]*,[jsonparser]*,[SimpleExpressionParser]*\" ParserTests/ParserTests.csproj | ||
|
||
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:exclude=\"[while]*,[expressionParser]*,[GenericLexerWithCallbacks]*,[jsonparser]*,[SimpleExpressionParser]*\" ParserTests/ParserTests.csproj | ||
|
||
echo "############################" | ||
# Publish coverage to Coverall on Windows | ||
after_test: | ||
- ps: | | ||
if ($isWindows) { | ||
csmacnz.Coveralls --opencover -i ./ParserTests/coverage.opencover.xml --repoToken 4I3WBzHay1o8YwAH4xRskEHbi5w71atBP --commitBranch "%APPVEYOR_REPO_BRANCH%" --commitId "%APPVEYOR_REPO_COMMIT%" --commitAuthor "%APPVEYOR_REPO_COMMIT_AUTHOR%" --commitEmail "%APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL%" --jobId "%APPVEYOR_JOB_ID%" | ||
} | ||
tools\csmacnz.coveralls.exe --opencover -i ./ParserTests/coverage.opencover.xml --repoToken 4I3WBzHay1o8YwAH4xRskEHbi5w71atBP --commitBranch "%APPVEYOR_REPO_BRANCH%" --commitId "%APPVEYOR_REPO_COMMIT%" --commitAuthor "%APPVEYOR_REPO_COMMIT_AUTHOR%" --commitEmail "%APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL%" --jobId "%APPVEYOR_JOB_ID%" | ||
artifacts: | ||
- path: sly/bin/$(CONFIGURATION)/*.nupkg | ||
name: sly | ||
|
||
|
||
echo "############################" | ||
# Deploy nuget package from Windows | ||
deploy: | ||
- provider: NuGet | ||
skip_symbols: true | ||
api_key: | ||
secure: jlkQ4lJxiapfC87YZMljFZbeROpo26F7wbEB7q+xn5xWlAyfOvy/SNrji8a5uKap | ||
on: | ||
branch: dev | ||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 | ||
|
||
|
||
dotnet pack -c Release | ||
test_script: | ||
- ps: dotnet test ParserTests/ParserTests.csproj | ||
artifacts: | ||
- path: sly/bin/release/* | ||
name: sly | ||
- path: sly_coverage.xml | ||
name: sly | ||
- path: ParserTests/coverage.opencover.xml | ||
name: sly | ||
deploy: | ||
- provider: NuGet | ||
api_key: | ||
secure: jlkQ4lJxiapfC87YZMljFZbeROpo26F7wbEB7q+xn5xWlAyfOvy/SNrji8a5uKap | ||
skip_symbols: true | ||
on: | ||
branch: dev | ||
notifications: | ||
- provider: Email | ||
to: | ||
- [email protected] | ||
on_build_success: true | ||
on_build_failure: true | ||
on_build_status_changed: true | ||
- provider: Email | ||
to: | ||
- [email protected] | ||
on_build_success: true | ||
on_build_failure: true | ||
on_build_status_changed: true |