From 32af4ff1cbd40751529c82ee1f8aa9aeee5b38d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20T=C3=BCken?= Date: Thu, 14 Nov 2019 21:56:12 +0300 Subject: [PATCH] Adding github ci for framework and module build and test. --- .github/workflows/main.yml | 24 +++++++++++++++++++++++ test-all.ps1 | 39 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 test-all.ps1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..123cc3ea62 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,24 @@ +name: 'Main' +on: + pull_request: + paths: + - 'framework/**' + - 'modules/**' + branches: + - dev +jobs: + build-test: + runs-on: windows-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-dotnet@master + with: + dotnet-version: '3.0.100' + + - name: Build All + run: .\build-all.ps1 + shell: pwsh + + - name: Test All + run: .\test-all.ps1 + shell: pwsh diff --git a/test-all.ps1 b/test-all.ps1 new file mode 100644 index 0000000000..3e2343d119 --- /dev/null +++ b/test-all.ps1 @@ -0,0 +1,39 @@ +# COMMON PATHS + +$rootFolder = (Get-Item -Path "./" -Verbose).FullName + +# List of solutions + +$solutionPaths = ( + "framework", + "modules/users", + "modules/permission-management", + "modules/setting-management", + "modules/feature-management", + "modules/identity", + "modules/identityserver", + "modules/tenant-management", + "modules/account", + "modules/docs", + "modules/blogging", + "modules/audit-logging", + "modules/background-jobs", + "modules/client-simulation", + "templates/module/aspnet-core", + "templates/app/aspnet-core" +) + +# Build all solutions + +foreach ($solutionPath in $solutionPaths) { + $solutionAbsPath = (Join-Path $rootFolder $solutionPath) + Set-Location $solutionAbsPath + dotnet test + if (-Not $?) { + Write-Host ("Test failed for the solution: " + $solutionPath) + Set-Location $rootFolder + exit $LASTEXITCODE + } +} + +Set-Location $rootFolder