forked from microsoft/Microsoft365DSC
-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (76 loc) · 3.29 KB
/
Global - Integration - EXO.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Global - Integration - EXO
on: [push]
jobs:
Integration-Global-EXO:
# The type of runner that the job will run on
runs-on: windows-latest
permissions: write-all
# 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: Configure Environment
shell: powershell
run: |
Set-ExecutionPolicy Unrestricted -Force
Get-ChildItem "C:\Program Files\WindowsPowerShell\Modules" -Recurse | Unblock-File
Set-M365DSCTelemetryOption -Enabled $false
Set-Item -Path WSMan:\localhost\MaxEnvelopeSizekb -Value 99999
- name: Generate {Create} Integration Tests from Examples
shell: powershell
run: |
Import-Module './Tests/Integration/M365DSCTestEngine.psm1'
New-M365DSCIntegrationTest -Workload EXO -Step '1-Create'
- name: Commit {Create} Integration Tests
shell: powershell
run: |
git config --local user.email "[email protected]"
git config --local user.name "NikCharlebois"
git add D:/a/Microsoft365DSC/Microsoft365DSC/Tests/Integration/*
git pull
git commit -m "Updated {Create} EXO Integration Tests"
git push
$SHA = git rev-parse HEAD
echo "commitid=$SHA" >> $env:GITHUB_OUTPUT
- name: Generate {Update} Integration Tests from Examples
shell: powershell
run: |
Import-Module './Tests/Integration/M365DSCTestEngine.psm1'
New-M365DSCIntegrationTest -Workload EXO -Step '2-Update'
- name: Commit {Update} Integration Tests
shell: powershell
run: |
git config --local user.email "[email protected]"
git config --local user.name "NikCharlebois"
git add D:/a/Microsoft365DSC/Microsoft365DSC/Tests/Integration/*
git pull
git commit -m "Updated {Update} EXO Integration Tests"
git push
$SHA = git rev-parse HEAD
echo "commitid=$SHA" >> $env:GITHUB_OUTPUT
- name: Generate {Remove} Integration Tests from Examples
shell: powershell
run: |
Import-Module './Tests/Integration/M365DSCTestEngine.psm1'
New-M365DSCIntegrationTest -Workload EXO -Step '3-Remove'
- name: Commit {Remove} Integration Tests
shell: powershell
run: |
git config --local user.email "[email protected]"
git config --local user.name "NikCharlebois"
git add D:/a/Microsoft365DSC/Microsoft365DSC/Tests/Integration/*
git pull
git commit -m "Updated {Update} EXO Integration Tests"
git push
$SHA = git rev-parse HEAD
echo "commitid=$SHA" >> $env:GITHUB_OUTPUT