Continuous Integration with ASP.NET 5, GitHub and Travis CI - Part 2

Posted by Anuraj on Sunday, July 5, 2015 Reading time :1 minute

.Net ASP.Net ASP.Net MVC Version Control

Few days back I did a post on Continuous Integration with ASP.NET 5, GitHub and Travis CI. In that post I was using K runtime and K commands. From ASP.NET 5 Beta 4, Microsoft changed the runtime to DNX, the K runtime became obsolete. This post is about continuous integration using DNX runtime. Only minor changes are required. Here is the .travis.yml file.

language: CSharp
  - latest
  - curl -sSL | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/
  - dnvm upgrade
  - dnu restore
  - dnx /home/travis/build/anuraj/ASPNET5CIDemo/test/project.json test -parallel none

The first line specifies the language. Second is the runtime, Travis CI is using Linux Docker containers, you require mono, which is latest version. Next the install section specifies the which all software required to do CI. Here you can download DNM and DNX runtime. In that you can also specify that restore the packages, with dnu restore. Once it is finished successfully. Travis CI will execute the script element, where you are running the dnx . test command, which executes the test. In this I am following ASP.NET 5 recommended folder structure, so instead of dnx ., you need to specify the test project, project.json location. Parallel none flag disables the parallel execution, which is a known issue in Linux environment.

You can find the source code and build details.

Happy Programming :)

What do you think? I would like to hear your thoughts, suggestions, and questions in the comments section below.

Similar Posts

Did you like this article? Share it with your friends

Facebook Twitter Google+ LinkedIn Reddit StumbleUpon

BMC logoBuy me a coffee

Copyright © 2019 - Anuraj P. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Hosted with ❤ by GitHub