forked from microsoft/Microsoft365DSC
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (44 loc) · 2 KB
/
AzureCloud - Integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: AzureCloud Public - Integration
on: [push]
jobs:
# This workflow contains a single job called "build"
Integration-PublicCloud:
# The type of runner that the job will run on
runs-on: windows-latest
# Only when run from the main repo
if: github.repository == 'microsoft/Microsoft365DSC'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install Microsoft365DSC
shell: powershell
run: |
winrm quickconfig -force
$source = "./Modules/Microsoft365DSC/"
$destination = "C:\Program Files\WindowsPowerShell\Modules"
Copy-Item -Path $source -Recurse -Destination $destination -Container -Force
Update-M365DSCDependencies
- name: Run Integration Tests
shell: powershell
env:
PUBLIC_USERNAME: ${{ secrets.PUBLIC_USERNAME }}
PUBLIC_PASSWORD: ${{ secrets.PUBLIC_PASSWORD }}
run: |
Set-ExecutionPolicy Unrestricted -Force
Get-ChildItem "C:\Program Files\WindowsPowerShell\Modules" -Recurse | Unblock-File
$GlobalAdminPassword = ConvertTo-SecureString $env:PUBLIC_PASSWORD -AsPlainText -Force
Set-M365DSCTelemetryOption -Enabled $false
Set-Item -Path WSMan:\localhost\MaxEnvelopeSizekb -Value 99999
$VerbosePreference = 'Continue'
Write-Verbose -Message "Username: $($env:PUBLIC_USERNAME)"
& ./Tests/Integration/M365DSCIntegration.Master.Tests.ps1 `
-GlobalAdminUser $env:PUBLIC_USERNAME `
-GlobalAdminPassword $env:PUBLIC_PASSWORD
$config = Test-DSCConfiguration -Detailed -Verbose
if (!$config.InDesiredState)
{
Write-Host $config
Write-Host $config.ResourcesNotInDesiredState.InstanceName
throw "Could not validate that the Tenant is in the Desired State"
}