Browse Source

update build scripts to ensure tests only run once during CI

af/merge-core
Scott Williams 9 years ago
parent
commit
264f566907
  1. 2
      appveyor.yml
  2. 11
      build.cmd

2
appveyor.yml

@ -18,7 +18,7 @@ build_script:
test_script:
- tests\CodeCoverage\CodeCoverage.cmd
after_build:
after_test:
- cmd: appveyor PushArtifact "artifacts\SixLabors.ImageSharp.%GitVersion_NuGetVersion%.nupkg"
- cmd: appveyor PushArtifact "artifacts\SixLabors.ImageSharp.Drawing.%GitVersion_NuGetVersion%.nupkg"

11
build.cmd

@ -1,5 +1,6 @@
@echo Off
SET versionCommand=
if not "%GitVersion_NuGetVersion%" == "" (
SET versionCommand=/p:packageversion=%GitVersion_NuGetVersion%
@echo building with version set to '%GitVersion_NuGetVersion%'
@ -7,16 +8,18 @@ if not "%GitVersion_NuGetVersion%" == "" (
dotnet restore %versionCommand%
ECHO Building nuget packages
ECHO Building projects
dotnet build -c Release %versionCommand%
if not "%errorlevel%"=="0" goto failure
if not %CI% == "True" (
if not "%CI%" == "True" (
ECHO NOT on CI server running tests
dotnet test ./tests/ImageSharp.Tests/ImageSharp.Tests.csproj --no-build -c Release
if not "%errorlevel%"=="0" goto failure
)
if not "%errorlevel%"=="0" goto failure
ECHO Packaging projects
dotnet pack ./src/ImageSharp/ -c Release --output ../../artifacts --no-build %versionCommand%
if not "%errorlevel%"=="0" goto failure

Loading…
Cancel
Save