Fix Allure reports for different benchmark jobs (#4229)

- Fix Allure report generation failure for Nightly Benchmarks
- Fix GitHub Autocomment for `run-benchmarks` label
(`build_and_test.yml::benchmarks` job)
This commit is contained in:
Alexander Bayandin
2023-05-15 13:04:03 +01:00
committed by GitHub
parent 4a76f2b8d6
commit a5615bd8ea
2 changed files with 12 additions and 2 deletions

View File

@@ -206,4 +206,4 @@ runs:
uses: ./.github/actions/allure-report-store
with:
report-dir: /tmp/test_output/allure/results
unique-key: ${{ inputs.test_selection }}-${{ inputs.build_type }}
unique-key: ${{ inputs.build_type }}

View File

@@ -79,7 +79,17 @@ module.exports = async ({ github, context, fetch, report }) => {
for (const parentSuite of suites.children) {
for (const suite of parentSuite.children) {
for (const test of suite.children) {
const {groups: {buildType, pgVersion}} = test.name.match(/[\[-](?<buildType>debug|release)-pg(?<pgVersion>\d+)[-\]]/)
let buildType, pgVersion
const match = test.name.match(/[\[-](?<buildType>debug|release)-pg(?<pgVersion>\d+)[-\]]/)?.groups
if (match) {
({buildType, pgVersion} = match)
} else {
// It's ok, we embed BUILD_TYPE and Postgres Version into the test name only for regress suite and do not for other suites (like performance).
console.info(`Cannot get BUILD_TYPE and Postgres Version from test name: "${test.name}", defaulting to "release" and "14"`)
buildType = "release"
pgVersion = "14"
}
pgVersions.add(pgVersion)
buildTypes.add(buildType)