Run the MultiverseScanner #217
Workflow file for this run
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
name: Run the MultiverseScanner | |
on: | |
workflow_call: | |
inputs: | |
agentVersion: | |
description: 'Agent version being tested' | |
default: '0.0.0.0' | |
required: true | |
type: string | |
workflow_dispatch: | |
inputs: | |
agentVersion: | |
description: 'Agent version being tested' | |
default: '0.0.0.0' | |
required: true | |
env: | |
DOTNET_NOLOGO: true | |
permissions: | |
contents: read | |
jobs: | |
build-run-publish-multiverse-testing: | |
name: Build and Publish Multiverse Testing Suite | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
env: | |
multiverse_path: ${{ github.workspace }}/tests/Agent/MultiverseTesting | |
multiverse_solution: ${{ github.workspace }}/tests/Agent/MultiverseTesting/MultiverseTesting.sln | |
multiverse_consolescanner_path: ${{ github.workspace }}/tests/Agent/MultiverseTesting/ConsoleScanner/bin/Release/net8.0 | |
multiverse_reportbuilder_path: ${{ github.workspace }}/tests/Agent/MultiverseTesting/ReportBuilder/bin/Release/net8.0 | |
MVS_XML_PATH: ${{ github.workspace }}/src/Agent/NewRelic/Agent/Extensions/Providers/Wrapper | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Cache Multiverse Testing Suite | |
id: cache-multiverse | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: ${{ env.multiverse_path }} | |
key: multiverse-${{ hashFiles('**/tests/Agent/MultiverseTesting') }} | |
- name: Build MultiverseTesting.sln | |
if: steps.cache-multiverse.outputs.cache-hit != 'true' | |
run: | | |
echo "List NuGet Sources (necessary to avoid subsequent problems with NuGet package restore)" | |
dotnet nuget list source | |
echo "dotnet build ${{ env.multiverse_solution }} --configuration Release" | |
dotnet build ${{ env.multiverse_solution }} --configuration Release | |
shell: bash | |
- name: Run ConsoleScanner | |
run: | | |
cd ${{ env.multiverse_consolescanner_path }} | |
./ConsoleScanner "./config.yml" "./reports.yml" | |
shell: bash | |
- name: Upload MVS | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: mvs | |
path: | | |
${{ env.multiverse_consolescanner_path }} | |
${{ env.multiverse_reportbuilder_path }} | |
! ${{ env.multiverse_consolescanner_path }}/NugetData/**/* | |
! ${{ env.multiverse_consolescanner_path }}/runtimes/**/* | |
if-no-files-found: error | |
retention-days: 1 | |
publish-docs: | |
permissions: | |
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo | |
needs: build-run-publish-multiverse-testing | |
name: Publish Docs to gh-pages | |
if: ${{ success() }} | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
env: | |
multiverse_path: ${{ github.workspace }}/tests/Agent/MultiverseTesting | |
multiverse_solution: ${{ github.workspace }}/tests/Agent/MultiverseTesting/MultiverseTesting.sln | |
multiverse_consolescanner_path: ${{ github.workspace }}/tests/Agent/MultiverseTesting/ConsoleScanner/bin/Release/net8.0 | |
multiverse_reportbuilder_path: ${{ github.workspace }}/tests/Agent/MultiverseTesting/ReportBuilder/bin/Release/net8.0 | |
MVS_XML_PATH: ${{ github.workspace }}/src/Agent/NewRelic/Agent/Extensions/Providers/Wrapper | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: 'gh-pages' | |
fetch-depth: 0 | |
- name: Download MVS | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: mvs | |
path: ${{ env.multiverse_path }} | |
- name: Run ReportBuilder | |
run: | | |
cd ${{ env.multiverse_reportbuilder_path }} | |
sudo chmod 777 ./ReportBuilder | |
./ReportBuilder "${{ inputs.agentVersion }}" "${{ env.multiverse_consolescanner_path }}/reports.yml" "${{ github.workspace }}/docs/mvs" | |
shell: bash | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@881db5376404c5c8d621010bcbec0310b58d5e29 # 4.6.8 | |
with: | |
branch: gh-pages | |
folder: . |