Skip to content

Feature/152 Introduce WcfSoapWithOpenIdConnect next to existing WcfSoapWithWsTrust #112

Feature/152 Introduce WcfSoapWithOpenIdConnect next to existing WcfSoapWithWsTrust

Feature/152 Introduce WcfSoapWithOpenIdConnect next to existing WcfSoapWithWsTrust #112

name: Continuous Integration
on:
push:
branches: [ master ]
paths:
- 'Source/**'
- '*.TXT'
- '*.MD'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET 6.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore project and dependencies
run: dotnet restore Source/ISHRemote/ISHRemote.sln
- name: Build Solution
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet build --no-restore --no-incremental --configuration release Source/ISHRemote/ISHRemote.sln
- name: Setup PowerShell PSScriptAnalyzer
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module PSScriptAnalyzer -ErrorAction Stop
- name: Lint with PSScriptAnalyzer
shell: pwsh
run: |
Invoke-ScriptAnalyzer -Path Source/ISHRemote/Trisoft.ISHRemote/Scripts -Recurse -Outvariable issues
$errors = $issues.Where({$_.Severity -eq 'Error'})
$warnings = $issues.Where({$_.Severity -eq 'Warning'})
if ($errors) {
Write-Warning "There were $($errors.Count) errors and $($warnings.Count) warnings total."
} else {
Write-Output "There were $($errors.Count) errors and $($warnings.Count) warnings total."
}
- name: Archive ISHRemote module
uses: actions/upload-artifact@v3
with:
name: ISHRemote-MainCI-Module
path: Source/ISHRemote/Trisoft.ISHRemote/bin/Release/ISHRemote/
- name: Pester Test Preparation (...products.com) on Windows using PowerShell 7.x
shell: pwsh
env:
ISH_BASE_URL: ${{ secrets.ISH_BASE_URL }}
ISH_USER_NAME: ${{ secrets.ISH_USER_NAME }}
ISH_PASSWORD: ${{ secrets.ISH_PASSWORD }}
ISH_CLIENT_ID: ${{ secrets.ISH_CLIENT_ID }}
ISH_CLIENT_SECRET: ${{ secrets.ISH_CLIENT_SECRET }}
run: |
$filePath = 'Source/ISHRemote/Trisoft.ISHRemote/ISHRemote.PesterSetup.Debug.ps1'
Add-Content -Path $filePath -Value '# File[$filePath] is generated through continuous-integration.yml section PowerShell 7.x'
Add-Content -Path $filePath -Value '$baseUrl = $env:ISH_BASE_URL'
Add-Content -Path $filePath -Value 'if ($baseUrl -like "*.sdlproducts.com*")'
Add-Content -Path $filePath -Value '{'
Add-Content -Path $filePath -Value ' $ishEventTypeToPurge = ''TESTBACKGROUNDTASK''' # before 14SP4 use ''PUSHTRANSLATIONS'''
Add-Content -Path $filePath -Value ' $ishLngLabel = ''en-us'''
Add-Content -Path $filePath -Value ' $ishLngTarget1 = ''VLANGUAGEESES'''
Add-Content -Path $filePath -Value ' $ishLngTarget1Label = ''es-es'''
Add-Content -Path $filePath -Value ' $ishLngTarget2 = ''VLANGUAGEDEDE'''
Add-Content -Path $filePath -Value ' $ishLngTarget2Label = ''de-de'''
Add-Content -Path $filePath -Value ' $ishLngCombination = ''en-us'''
Add-Content -Path $filePath -Value '}'
- name: Pester Test Prerequisites on Windows using PowerShell 7.x
shell: pwsh
env:
ISH_BASE_URL: ${{ secrets.ISH_BASE_URL }}
ISH_USER_NAME: ${{ secrets.ISH_USER_NAME }}
ISH_PASSWORD: ${{ secrets.ISH_PASSWORD }}
ISH_CLIENT_ID: ${{ secrets.ISH_CLIENT_ID }}
ISH_CLIENT_SECRET: ${{ secrets.ISH_CLIENT_SECRET }}
run: Invoke-Pester -Path Source/ISHRemote/Trisoft.ISHRemote/Cmdlets/_TestEnvironment/TestPrerequisite.Tests.ps1 -Output Detailed -Passthru | Export-CliXml -Path Cmdlets.Pester.Tests.xml
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: ISHRemote-MainCI-PesterPrerequisiteOnPowerShellCore
path: Cmdlets.Pester.Tests.xml
- name: Pester Test Cmdlets on Windows using PowerShell 7.x
shell: pwsh
env:
ISH_BASE_URL: ${{ secrets.ISH_BASE_URL }}
ISH_USER_NAME: ${{ secrets.ISH_USER_NAME }}
ISH_PASSWORD: ${{ secrets.ISH_PASSWORD }}
ISH_CLIENT_ID: ${{ secrets.ISH_CLIENT_ID }}
ISH_CLIENT_SECRET: ${{ secrets.ISH_CLIENT_SECRET }}
run: Invoke-Pester -Path Source/ISHRemote/Trisoft.ISHRemote/Cmdlets/ -Output Detailed -Passthru | Export-CliXml -Path Cmdlets.Pester.Tests.xml
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: ISHRemote-MainCI-PesterOnPowerShellCore
path: Cmdlets.Pester.Tests.xml
if: ${{ always() }}
- name: Pester Test Preparation (...products.com) using Windows PowerShell 5.1
shell: powershell
env:
ISH_BASE_URL: ${{ secrets.ISH_BASE_URL }}
ISH_USER_NAME: ${{ secrets.ISH_USER_NAME }}
ISH_PASSWORD: ${{ secrets.ISH_PASSWORD }}
ISH_CLIENT_ID: ${{ secrets.ISH_CLIENT_ID }}
ISH_CLIENT_SECRET: ${{ secrets.ISH_CLIENT_SECRET }}
run: |
$filePath = 'Source/ISHRemote/Trisoft.ISHRemote/ISHRemote.PesterSetup.Debug.ps1'
Add-Content -Path $filePath -Value '# File[$filePath] is generated through continuous-integration.yml section Windows PowerShell 5.1'
Add-Content -Path $filePath -Value '$baseUrl = $env:ISH_BASE_URL'
Add-Content -Path $filePath -Value 'if ($baseUrl -like "*.sdlproducts.com*")'
Add-Content -Path $filePath -Value '{'
Add-Content -Path $filePath -Value ' $ishEventTypeToPurge = ''TESTBACKGROUNDTASK''' # before 14SP4 use ''PUSHTRANSLATIONS'''
Add-Content -Path $filePath -Value ' $ishLngLabel = ''en-us'''
Add-Content -Path $filePath -Value ' $ishLngTarget1 = ''VLANGUAGEESES'''
Add-Content -Path $filePath -Value ' $ishLngTarget1Label = ''es-es'''
Add-Content -Path $filePath -Value ' $ishLngTarget2 = ''VLANGUAGEDEDE'''
Add-Content -Path $filePath -Value ' $ishLngTarget2Label = ''de-de'''
Add-Content -Path $filePath -Value ' $ishLngCombination = ''en-us'''
Add-Content -Path $filePath -Value '}'
- name: Pester Test Cmdlets using Windows PowerShell 5.1
shell: powershell
env:
ISH_BASE_URL: ${{ secrets.ISH_BASE_URL }}
ISH_USER_NAME: ${{ secrets.ISH_USER_NAME }}
ISH_PASSWORD: ${{ secrets.ISH_PASSWORD }}
ISH_CLIENT_ID: ${{ secrets.ISH_CLIENT_ID }}
ISH_CLIENT_SECRET: ${{ secrets.ISH_CLIENT_SECRET }}
run: Invoke-Pester -Path Source/ISHRemote/Trisoft.ISHRemote/Cmdlets/ -Output Detailed -Passthru | Export-CliXml -Path Cmdlets.Pester.Tests.xml
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: ISHRemote-MainCI-PesterOnWindowsPowerShell
path: Cmdlets.Pester.Tests.xml
if: ${{ always() }}