Skip to content

Commit

Permalink
Update .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon committed Oct 1, 2019
1 parent 259f15c commit 456e967
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,15 @@ before_script:
- echo "Checking format..."
- dotnet format --check --dry-run -w . -v diagnostic # check C# formatting for neo.sln
- cd neo.UnitTests
- # Add coverage library
- if [[ "$TEST_SUITE" == "without-cultures" && "$TRAVIS_OS_NAME" == "linux" ]]; then find * -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild; fi
- # Restore & Build
- dotnet restore
script: |
if [[ "$TEST_SUITE" == "cultures" ]]; then
dotnet test -v n --no-restore /nodereuse:false --filter FullyQualifiedName=Neo.UnitTests.UT_Culture.All_Tests_Cultures
else
if [[ "$TEST_SUITE" == "without-cultures" && "$TRAVIS_OS_NAME" == "linux" ]]; then
# Test & Calculate coverage
find * -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild
dotnet test -v n --no-restore /nodereuse:false --filter FullyQualifiedName!=Neo.UnitTests.UT_Culture.All_Tests_Cultures /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
else
# Only test
dotnet test -v n --no-restore /nodereuse:false --filter FullyQualifiedName!=Neo.UnitTests.UT_Culture.All_Tests_Cultures
fi
fi
after_success: |
if [[ "$TEST_SUITE" == "without-cultures" && "$TRAVIS_OS_NAME" == "linux" ]]; then
# Send coverage
echo "Test Success - Branch($TRAVIS_BRANCH) Pull Request($TRAVIS_PULL_REQUEST) Tag($TRAVIS_TAG)"
bash <(curl -s https://codecov.io/bash) -v
fi
- dotnet build /nodereuse:false
script:
- if [[ "$TEST_SUITE" == "cultures" ]]; then dotnet test -v n --no-build --filter FullyQualifiedName=Neo.UnitTests.UT_Culture.All_Tests_Cultures; fi
- if [[ "$TEST_SUITE" != "cultures" ]]; then dotnet test -v n --no-build --filter FullyQualifiedName!=Neo.UnitTests.UT_Culture.All_Tests_Cultures; fi
after_success:
- if [[ "$TEST_SUITE" == "without-cultures" && "$TRAVIS_OS_NAME" == "linux" ]]; then echo "Test Success - Branch($TRAVIS_BRANCH) Pull Request($TRAVIS_PULL_REQUEST) Tag($TRAVIS_TAG)"; fi
- if [[ "$TEST_SUITE" == "without-cultures" && "$TRAVIS_OS_NAME" == "linux" ]]; then bash <(curl -s https://codecov.io/bash) -v; fi

0 comments on commit 456e967

Please sign in to comment.