Skip to content

Commit 44f854f

Browse files
[PERF-319] Run Volume Test on github Action (#97)
* Volume Test in VM * update volume test name * error cannot find comparison folder * on workflow dispatch * comments * update name for the action * workflow permissions update for PERF-324 --------- Co-authored-by: Vinaya Mayya <[email protected]>
1 parent d9480e3 commit 44f854f

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

.github/workflows/run_volume_test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Licensed to the Ed-Fi Alliance under one or more agreements.
3+
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
4+
# See the LICENSE and NOTICES files in the project root for more information.
5+
6+
name: Run Volume Test
7+
on:
8+
workflow_dispatch:
9+
10+
permissions: read-all
11+
12+
env:
13+
AzureTestVmUsername: ${{ secrets.AZURE_TEST_VM_USER_NAME }}
14+
AzureTestVmPassword: ${{ secrets.AZURE_TEST_VM_PASSWORD }}
15+
16+
jobs:
17+
volume-test:
18+
runs-on: windows-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
23+
24+
- name: Execute Test Runner
25+
if: ${{ env.AzureTestVmUsername != '' && env.AzureTestVmPassword != '' }}
26+
shell: powershell
27+
working-directory: ./eng/
28+
run: |
29+
. $env:GITHUB_WORKSPACE/eng/AzureTestLab.ps1
30+
Invoke-TestRunnerFromTeamCity volume
31+
32+
- name: Upload Package
33+
if: success()
34+
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
35+
with:
36+
name: TestResults
37+
path: ${{ github.workspace }}/eng/artifacts/

src/perf-test-analysis/edfi_perf_test_analysis/ui_helpers.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,15 @@ def get_result_directory() -> Tuple[str, str]:
100100
index = -2
101101
# find compare_dir with same type of test results as in the result_dir
102102
while not os.path.exists(os.path.join(time_sorted_list[index], result_file)):
103+
# IndexError: list index out of range
104+
if abs(index - 1) > len(time_sorted_list):
105+
break
103106
index = index - 1
104-
compare_dir = time_sorted_list[index]
107+
108+
# when it is the first execution of the test there is nothing to compare against
109+
if not os.path.exists(os.path.join(time_sorted_list[index], result_file)):
110+
compare_dir = result_dir
111+
else:
112+
compare_dir = time_sorted_list[index]
105113

106114
return (result_dir, compare_dir)

0 commit comments

Comments
 (0)