Skip to content

Commit

Permalink
add exchange
Browse files Browse the repository at this point in the history
  • Loading branch information
james-garriss committed Sep 18, 2024
1 parent 2e2f9f6 commit 4b21542
Show file tree
Hide file tree
Showing 5 changed files with 229 additions and 73 deletions.
6 changes: 1 addition & 5 deletions .github/actions/test-product/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ runs:
using: "composite"
steps:
- run: |
echo "thmb"
echo "${{ inputs.Thumbprint }}"
echo "alis"
echo "The alias is:"
echo "${{ inputs.Alias }}"
echo "params"
echo "${{ inputs.TestParams }}"
Import-Module -Name Selenium
cd repo
# Read thumbprint from previous step.
Expand Down
98 changes: 98 additions & 0 deletions .github/workflows/function_test_exchange.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Run functional tests for Exchange

name: Function Test Exchange

# This is a reusable workflow called by the pipeline.
on:
workflow_call:
inputs:
EmailOnFailure:
description: "The email address to send if workflow fails."
required: true
type: string
secrets:
PfxBase64:
required: true
PfxPassword:
required: true
TestParams:
required: true
TestParamsDev:
required: true
NotifierUsername:
required: true
NotifierPassword:
required: true
workflow_dispatch:

permissions:
id-token: write
contents: write

jobs:
Exc_Tenant1:
name: ${{ github.job }}
runs-on: windows-latest
environment: Development
permissions:
id-token: write
contents: write
concurrency:
group: Exchange_Tenant1
cancel-in-progress: false
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
path: repo
- name: Import PFX
uses: ./repo/.github/actions/import-pfx
with:
PfxBase64: ${{ secrets.PfxBase64 }}
PfxPassword: ${{ secrets.PfxPassword }}
- name: Get Thumbprint
id: get-thumbprint
uses: ./repo/.github/actions/get-thumbprint
with:
PfxPassword: ${{ secrets.PfxPassword }}
- name: Restore ScubaGear
uses: actions/cache/restore@v4
with:
path: C:\Program Files\WindowsPowerShell\Modules\ScubaGear
key: scubagear-directory-
- name: Restore Dependencies
uses: actions/cache/restore@v4
with:
path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules
key: powershell-directory-
- name: Restore OPA
uses: actions/cache/restore@v4
with:
path: C:\Users\runneradmin\.scubagear\Tools
key: opa-directory-
- name: Test
id: test-product
uses: ./repo/.github/actions/test-product
with:
Thumbprint: ${{ steps.get-thumbprint.outputs.thumbprint }}
Alias: ${{ github.job }}
TestParams: ${{ secrets.TestParamsDev }}
- name: Extract Email
# if: ${{ failure() && (inputs.EmailOnFailure || github.event.schedule || github.event_name == 'push') }}
uses: ./repo/.github/actions/extract-email
env:
Alias: ${{ github.job }}
TestParams: ${{ secrets.TestParamsDev }}
- name: Notify on Failure
if: ${{ failure() && (inputs.EmailOnFailure || github.event.schedule || github.event_name == 'push') }}
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.NotifierUsername }}
password: ${{ secrets.NotifierPassword }}
subject: Nightly functional test failure
body: The ${{ github.job }} test failed. Please look at the "Nightly Product Functional Tests" workflow for more details.
# to: ${{ steps.test-product.outputs.emails }}
to: [email protected]
from: ScubaGear Notifier
99 changes: 99 additions & 0 deletions .github/workflows/function_test_powerplatform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Run functional tests for Power Platform

name: Function Test Power Platform

# This is a reusable workflow called by the pipeline.
on:
workflow_call:
inputs:
EmailOnFailure:
description: "The email address to send if workflow fails."
required: true
type: string
secrets:
PfxBase64:
required: true
PfxPassword:
required: true
TestParams:
required: true
TestParamsDev:
required: true
NotifierUsername:
required: true
NotifierPassword:
required: true
workflow_dispatch:

permissions:
id-token: write
contents: write

jobs:
Pwr_Tenant1:
name: ${{ github.job }}
runs-on: windows-latest
environment: Development
permissions:
id-token: write
contents: write
concurrency:
group: Power_Tenant1
cancel-in-progress: false
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
path: repo
- name: Import PFX
uses: ./repo/.github/actions/import-pfx
with:
PfxBase64: ${{ secrets.PfxBase64 }}
PfxPassword: ${{ secrets.PfxPassword }}
- name: Get Thumbprint
id: get-thumbprint
uses: ./repo/.github/actions/get-thumbprint
with:
PfxPassword: ${{ secrets.PfxPassword }}
- name: Restore ScubaGear
uses: actions/cache/restore@v4
with:
path: C:\Program Files\WindowsPowerShell\Modules\ScubaGear
key: scubagear-directory-
- name: Restore Dependencies
uses: actions/cache/restore@v4
with:
path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules
key: powershell-directory-
- name: Restore OPA
uses: actions/cache/restore@v4
with:
path: C:\Users\runneradmin\.scubagear\Tools
key: opa-directory-
- name: Test
id: test-product
uses: ./repo/.github/actions/test-product
with:
Thumbprint: ${{ steps.get-thumbprint.outputs.thumbprint }}
Alias: ${{ github.job }}
TestParams: ${{ secrets.TestParamsDev }}
- name: Extract Email
# if: ${{ failure() && (inputs.email-on-failure || github.event.schedule || github.event_name == 'push') }}
uses: ./repo/.github/actions/extract-email
env:
Alias: ${{ github.job }}
TestParams: ${{ secrets.TestParamsDev }}
- name: Notify on Failure
# if: ${{ failure() && (inputs.email-on-failure || github.event.schedule || github.event_name == 'push') }}
if: ${{ success() }}
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.NotifierUsername }}
password: ${{ secrets.NotifierPassword }}
subject: Nightly functional test failure
body: The ${{ github.job }} test failed. Please look at the "Nightly Product Functional Tests" workflow for more details.
# to: ${{ steps.test-product.outputs.emails }}
to: [email protected]
from: ScubaGear Notifier
67 changes: 0 additions & 67 deletions .github/workflows/function_test_teams.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,70 +96,3 @@ jobs:
# to: ${{ steps.test-product.outputs.emails }}
to: [email protected]
from: ScubaGear Notifier
Tms_Tenant2:
name: ${{ github.job }}
runs-on: windows-latest
environment: Development
permissions:
id-token: write
contents: write
concurrency:
group: Tms_Tenant2
cancel-in-progress: false
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
path: repo
- name: Import PFX
uses: ./repo/.github/actions/import-pfx
with:
PfxBase64: ${{ secrets.PfxBase64 }}
PfxPassword: ${{ secrets.PfxPassword }}
- name: Get Thumbprint
id: get-thumbprint
uses: ./repo/.github/actions/get-thumbprint
with:
PfxPassword: ${{ secrets.PfxPassword }}
- name: Restore ScubaGear
uses: actions/cache/restore@v4
with:
path: C:\Program Files\WindowsPowerShell\Modules\ScubaGear
key: scubagear-directory-
- name: Restore Dependencies
uses: actions/cache/restore@v4
with:
path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules
key: powershell-directory-
- name: Restore OPA
uses: actions/cache/restore@v4
with:
path: C:\Users\runneradmin\.scubagear\Tools
key: opa-directory-
- name: Test
id: test-product
uses: ./repo/.github/actions/test-product
with:
Thumbprint: ${{ steps.get-thumbprint.outputs.thumbprint }}
Alias: ${{ github.job }}
TestParams: ${{ secrets.TestParamsDev }}
- name: Extract Email
# if: ${{ failure() && (inputs.EmailOnFailure || github.event.schedule || github.event_name == 'push') }}
uses: ./repo/.github/actions/extract-email
env:
Alias: ${{ github.job }}
TestParams: ${{ secrets.TestParamsDev }}
- name: Notify on Failure
# if: ${{ failure() && (inputs.EmailOnFailure || github.event.schedule || github.event_name == 'push') }}
if: ${{ success() }}
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.NotifierUsername }}
password: ${{ secrets.NotifierPassword }}
subject: Nightly functional test failure
body: The ${{ github.job }} test failed. Please look at the "Nightly Product Functional Tests" workflow for more details.
# to: ${{ steps.test-product.outputs.emails }}
to: [email protected]
from: ScubaGear Notifier
32 changes: 31 additions & 1 deletion .github/workflows/test_concurrency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,36 @@ jobs:
SubscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
KeyVaultInfo: ${{ secrets.SCUBA_KEY_VAULT_PROD}}

test_exchange:
name: Test Exchange
uses: ./.github/workflows/function_test_exchange.yaml
with:
EmailOnFailure: ${{ inputs.EmailOnFailure }}
secrets:
PfxBase64: ${{ secrets.NIGHTLY_TEST_BUILD_PFX }}
PfxPassword: ${{ secrets.NIGHTLY_TEST_BUILD_PW }}
TestParams: ${{ secrets.NIGHTLY_TEST_BUILD_PARAMS }}
TestParamsDev: ${{ secrets.NIGHTLY_TEST_BUILD_PARAMS_DEV }}
NotifierUsername: ${{ secrets.NOTIFIER_EMAIL_USERNAME }}
NotifierPassword: ${{ secrets.NOTIFIER_EMAIL_PASSWORD }}
needs:
- publish

test_power_platform:
name: Test Power Platform
uses: ./.github/workflows/function_test_powerplatform.yaml
with:
EmailOnFailure: ${{ inputs.EmailOnFailure }}
secrets:
PfxBase64: ${{ secrets.NIGHTLY_TEST_BUILD_PFX }}
PfxPassword: ${{ secrets.NIGHTLY_TEST_BUILD_PW }}
TestParams: ${{ secrets.NIGHTLY_TEST_BUILD_PARAMS }}
TestParamsDev: ${{ secrets.NIGHTLY_TEST_BUILD_PARAMS_DEV }}
NotifierUsername: ${{ secrets.NOTIFIER_EMAIL_USERNAME }}
NotifierPassword: ${{ secrets.NOTIFIER_EMAIL_PASSWORD }}
needs:
- publish

test_teams:
name: Test Teams
uses: ./.github/workflows/function_test_teams.yaml
Expand All @@ -54,7 +84,7 @@ jobs:
NotifierPassword: ${{ secrets.NOTIFIER_EMAIL_PASSWORD }}
needs:
- publish

test_sharepoint:
name: Test Sharepoint
uses: ./.github/workflows/function_test_sharepoint.yaml
Expand Down

0 comments on commit 4b21542

Please sign in to comment.