Skip to content

Commit

Permalink
Configure CI (no. 138)
Browse files Browse the repository at this point in the history
  • Loading branch information
cafour committed Jun 10, 2021
1 parent a57e69d commit caed224
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
5 changes: 3 additions & 2 deletions ci/linux/run.sh
Expand Up @@ -22,7 +22,7 @@ if [ $? -ne 0 ]; then
fi

echo "--------------------------------"
echo "dotnet build"
echo "sln build"
echo "--------------------------------"
cd $ROOT \
&& dotnet restore $ROOT/ci/linux/Linux.sln --packages $ROOT/.nuget\
Expand All @@ -39,7 +39,8 @@ dotnet test src/DotVVM.Framework.Tests \
--no-build \
--configuration $CONFIGURATION \
--logger trx \
--results-directory $TEST_RESULTS_DIR
--results-directory $TEST_RESULTS_DIR \
--collect "Code Coverage"

echo "--------------------------------"
echo "UI tests"
Expand Down
14 changes: 14 additions & 0 deletions ci/windows/Windows.sln
Expand Up @@ -19,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotVVM.Samples.BasicSamples
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EmbeddedResourceControls", "..\..\src\EmbeddedResourceControls\EmbeddedResourceControls.csproj", "{5E5BD33D-024A-4D20-A0CB-9551818ACF91}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotVVM.Framework.Tests", "..\..\src\DotVVM.Framework.Tests\DotVVM.Framework.Tests.csproj", "{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -125,6 +127,18 @@ Global
{5E5BD33D-024A-4D20-A0CB-9551818ACF91}.Release|x64.Build.0 = Release|Any CPU
{5E5BD33D-024A-4D20-A0CB-9551818ACF91}.Release|x86.ActiveCfg = Release|Any CPU
{5E5BD33D-024A-4D20-A0CB-9551818ACF91}.Release|x86.Build.0 = Release|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Debug|x64.ActiveCfg = Debug|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Debug|x64.Build.0 = Debug|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Debug|x86.ActiveCfg = Debug|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Debug|x86.Build.0 = Debug|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Release|Any CPU.Build.0 = Release|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Release|x64.ActiveCfg = Release|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Release|x64.Build.0 = Release|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Release|x86.ActiveCfg = Release|Any CPU
{3CFCFABD-72F9-4E8F-8F36-886815FCA76E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
20 changes: 17 additions & 3 deletions ci/windows/run.ps1
Expand Up @@ -2,7 +2,8 @@ param(
[switch] $noNpmBuild = $false,
[switch] $noSlnRestore = $false,
[switch] $noSlnBuild = $false,
[switch] $noUITest = $false)
[switch] $noUnitTests = $false,
[switch] $noUITests = $false)

$root = $env:DOTVVM_ROOT
if ($null -eq $root) {
Expand All @@ -17,6 +18,7 @@ if ($null -eq $configuration) {

$sln = "$root\ci\windows\Windows.sln"
$packagesDir = "$root\src\packages\"
$testResultsDir = "$root\artifacts\test\"

Write-Host "ROOT=$ROOT"
Write-Host "CONFIGURATION=$CONFIGURATION"
Expand Down Expand Up @@ -62,14 +64,26 @@ if ($noSlnBuild -ne $true) {
}
}

if ($noUnitTests -ne $true) {
Write-Host "--------------------------------"
Write-Host "unit tests"
Write-Host "--------------------------------"
dotnet test src/DotVVM.Framework.Tests `
--no-build `
--configuration $configuration `
--logger trx `
--results-directory $testResultsDir `
--collect "Code Coverage"
}

function Clean-UITest {
Stop-Process -Force -Name chrome -ErrorAction SilentlyContinue
Stop-Process -Force -Name chromedriver -ErrorAction SilentlyContinue
Remove-IISSite -Confirm:$false -Name dotvvm.owin
Remove-IISSite -Confirm:$false -Name dotvvm.owin.api
}

if ($noUITest -ne $true) {
if ($noUITests -ne $true) {
Write-Host "--------------------------------"
Write-Host "UI tests"
Write-Host "--------------------------------"
Expand Down Expand Up @@ -98,7 +112,7 @@ if ($noUITest -ne $true) {
dotnet test $root\src\DotVVM.Samples.Tests `
--configuration $configuration `
--logger trx `
--results-directory $root\artifacts\test
--results-directory $testResultsDir

Clean-UITest

Expand Down

0 comments on commit caed224

Please sign in to comment.