Testing: fix metrics job on push to trunk (#48893)
This PR fixes a failure in CI jobs (performance testing results publishing). The fix introduces a fallback path for the artifacts folder, similar to the command that performs the testing.
This commit is contained in:
parent
c70750b85a
commit
8382731a57
|
@ -15,14 +15,11 @@ const resultsFiles = [
|
|||
metricsPrefix: 'product-editor-',
|
||||
},
|
||||
];
|
||||
const ARTIFACTS_PATH =
|
||||
process.env.WP_ARTIFACTS_PATH || path.join( process.cwd(), 'artifacts' );
|
||||
|
||||
const performanceResults = resultsFiles.map( ( { file } ) =>
|
||||
JSON.parse(
|
||||
fs.readFileSync(
|
||||
path.join( process.env.WP_ARTIFACTS_PATH, file ),
|
||||
'utf8'
|
||||
)
|
||||
)
|
||||
JSON.parse( fs.readFileSync( path.join( ARTIFACTS_PATH, file ), 'utf8' ) )
|
||||
);
|
||||
|
||||
const data = new TextEncoder().encode(
|
||||
|
|
Loading…
Reference in New Issue