From 83b90d1980201de371df57f1cef83394a77a118e Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Wed, 14 Feb 2018 10:46:19 +0000 Subject: [PATCH] Update AppVeyor/Travis configs to run on .NET Core, enable selenium tests, etc. --- .appveyor.yml | 17 +++++++++++++---- .travis.yml | 15 ++++++++++++--- test/AllTests.proj | 8 ++++++++ 3 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 test/AllTests.proj diff --git a/.appveyor.yml b/.appveyor.yml index d0b4c6936b..9312f5fb30 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,5 +1,7 @@ init: - git config --global core.autocrlf true +install: + - ps: Install-Product node 8 x64 branches: only: - dev @@ -13,7 +15,14 @@ environment: test: 'off' deploy: 'off' os: Visual Studio 2017 Preview - -# Everything above here copied from the ASP.NET Core configurations -build: - project: Blazor.sln \ No newline at end of file +build_script: + - dotnet build Blazor.sln +before_test: + - choco install googlechrome + - npm install -g selenium-standalone + - selenium-standalone install + - ps: $SeleniumProcess = Start-Process "selenium-standalone" -ArgumentList "start" -PassThru +test_script: + - dotnet test test\AllTests.proj +after_test: + - ps: Stop-Process -Id $SeleniumProcess.Id diff --git a/.travis.yml b/.travis.yml index f117c4565a..d72be52223 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,16 @@ before_install: - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi - -# Everything above here copied from the ASP.NET Core configurations +install: + - . $HOME/.nvm/nvm.sh + - nvm install 8.9.4 + - nvm use 8.9.4 + - npm install -g selenium-standalone + - selenium-standalone install + - export DOTNET_INSTALL_DIR="$PWD/.dotnetcli" + - curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel Current --version latest --install-dir "$DOTNET_INSTALL_DIR" + - export PATH="$DOTNET_INSTALL_DIR:$PATH" script: - - dotnet build Blazor.sln \ No newline at end of file + - dotnet build Blazor.sln + - selenium-standalone start & + - dotnet test test/AllTests.proj diff --git a/test/AllTests.proj b/test/AllTests.proj new file mode 100644 index 0000000000..76345a3a6c --- /dev/null +++ b/test/AllTests.proj @@ -0,0 +1,8 @@ + + + + + + + +