Skip to content

Commit

Permalink
Check dotnet format in travis
Browse files Browse the repository at this point in the history
This will prevent to push any format error

Related to neo-project/neo#982
  • Loading branch information
shargon authored Aug 25, 2019
1 parent cbb3ca1 commit 2bdc540
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ dotnet: 2.2.300

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ulimit -n 2048; fi

install:
- dotnet tool install -g dotnet-format
- export PATH="$PATH:$HOME/.dotnet/tools"
before_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 test\Neo.Compiler.MSIL.UnitTests
- dotnet format --check --dry-run -w test\Neo.SmartContract.Framework.UnitTests
script:
- dotnet restore
- dotnet test
- cd test\Neo.Compiler.MSIL.UnitTests
- dotnet restore
- dotnet test
- cd ..
- cd test\Neo.SmartContract.Framework.UnitTests
- dotnet restore
- dotnet test

0 comments on commit 2bdc540

Please sign in to comment.