diff --git a/.travis.yml b/.travis.yml index 9ac387e53..5f3436e73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,31 +2,31 @@ language: csharp os: - linux - - osx dist: bionic -osx_image: xcode9.1 - mono: none -dotnet: 2.2.300 +dotnet: 2.2.402 -before_install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ulimit -n 2048; fi install: - - dotnet tool install -g dotnet-format --version 4.0.40103 --add-source https://dotnet.myget.org/F/format/api/v3/index.json + - dotnet tool install -g dotnet-format - export PATH="$PATH:$HOME/.dotnet/tools" - dotnet-format --version -before_script: +script: - echo "Checking format..." - dotnet format --check --dry-run -w src/Installer - dotnet format --check --dry-run -w src/Neo.Compiler.MSIL - dotnet format --check --dry-run -w src/Neo.SmartContract.Framework - dotnet format --check --dry-run -w tests/Neo.Compiler.MSIL.UnitTests - dotnet format --check --dry-run -w tests/Neo.SmartContract.Framework.UnitTests -script: - cd tests/Neo.Compiler.MSIL.UnitTests - - dotnet restore - - dotnet test + - find * -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild + - dotnet test -v m /p:CollectCoverage=true /p:CoverletOutputFormat=json /p:CoverletOutput='../coverageA.json' /p:Exclude="[Neo.SmartContract.*]*" - cd ../Neo.SmartContract.Framework.UnitTests - - dotnet restore - - dotnet test + - find * -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild + - dotnet test -v m /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput='../../coverage.xml' /p:MergeWith='../coverageA.json' /p:Exclude="[Neo.SmartContract.*]*" +after_success: + # Send coverage + - cd ../../ + - echo "Test Success - Branch($TRAVIS_BRANCH) Pull Request($TRAVIS_PULL_REQUEST) Tag($TRAVIS_TAG)" + - bash <(curl -s https://codecov.io/bash) -v -f 'coverage.xml' +