-
Notifications
You must be signed in to change notification settings - Fork 62
127 lines (109 loc) · 4.59 KB
/
multiverse_run.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
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: .