mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 02:45:22 -08:00
Support coma separated list of paths to test reports
This commit is contained in:
@@ -90,14 +90,17 @@ function getParser(reporter: string): ParseTestResult {
|
||||
}
|
||||
|
||||
export async function getFiles(pattern: string): Promise<FileContent[]> {
|
||||
const paths = await glob(pattern, {dot: true})
|
||||
return Promise.all(
|
||||
const paths = (await Promise.all(pattern.split(',').map(async pat => glob(pat, {dot: true})))).flat()
|
||||
|
||||
const files = Promise.all(
|
||||
paths.map(async path => {
|
||||
core.info(`Reading test report '${path}'`)
|
||||
const content = await fs.promises.readFile(path, {encoding: 'utf8'})
|
||||
return {path, content}
|
||||
})
|
||||
)
|
||||
|
||||
return files
|
||||
}
|
||||
|
||||
run()
|
||||
|
||||
Reference in New Issue
Block a user