Update health tests to execute locally per role #458
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Server2019SDNPullRequest | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on pull request events but only for the main branch | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'src/**' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
permissions: | |
contents: read | |
jobs: | |
# This workflow contains a single job called "build" | |
build-and-test: | |
# The type of runner that the job will run on | |
runs-on: [self-hosted,Windows,X64] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Cleanup existing files | |
run: | | |
Remove-Item -Path .\* -Recurse -Force -Verbose | |
shell: powershell | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout SdnDiagnostics repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
# Runs a single command using the runners shell | |
- name: Build SdnDiagnostics Module and Nuget Package | |
run: | | |
nuget.exe update -self | |
.\build.ps1 | |
shell: powershell | |
# Run the test configuration file that is locally on the test environment | |
- name: Run online validation tests | |
run: .\tests\online\RunTests.ps1 -ConfigurationFile "..\SdnDiagnosticsTestConfig.psd1" | |
shell: powershell |