It’s great news that my favourite cloud CI service, Travis CI now supports C# directly.
Even though this is only a beta deployment, it feels like a massive step forward. I hae all of my code building at commit time AND I have unit tests as well!
Changes to .travis.yml
Gone is the need to convince travis that this is a C project. We can at last proudly proclaim it to be C#. Another big change is that we don’t have to direct it to install mono, it’s already done for us.
language: csharp solution: NDiffference.sln install: - nuget restore NDifference.sln - nuget install xunit.runners -Version 1.9.2 -OutputDirectory testrunner script: - xbuild /p:Configuration=Release NDifference.sln - mono ./testrunner/xunit.runners.1.9.2/tools/xunit.console.clr4.exe ./tests/UnitTests/bin/Release/NDifference.UnitTests.dll
One thing to note, NDifference is built against v4 of the .Net runtime so I had to make sure that I started the correct xunit console runner.
Here’s how Travis does the build now:
Currently, all my tests pass when run on a Windows machine but not when run in Travis. I will investigate the differences and report back.
Here’s how Travis thinks NDifference is performing: