mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Skip listing of files if error parsing is disabled
This commit is contained in:
parent
33529f74ef
commit
3963c5302f
2 changed files with 5 additions and 4 deletions
5
dist/index.js
generated
vendored
5
dist/index.js
generated
vendored
|
|
@ -326,9 +326,10 @@ class TestReporter {
|
||||||
? new artifact_provider_1.ArtifactProvider(this.octokit, this.artifact, this.name, pattern, this.context.sha, this.context.runId, this.token)
|
? new artifact_provider_1.ArtifactProvider(this.octokit, this.artifact, this.name, pattern, this.context.sha, this.context.runId, this.token)
|
||||||
: new local_file_provider_1.LocalFileProvider(this.name, pattern);
|
: new local_file_provider_1.LocalFileProvider(this.name, pattern);
|
||||||
const parseErrors = this.maxAnnotations > 0;
|
const parseErrors = this.maxAnnotations > 0;
|
||||||
const trackedFiles = yield inputProvider.listTrackedFiles();
|
const trackedFiles = parseErrors ? yield inputProvider.listTrackedFiles() : [];
|
||||||
const workDir = this.artifact ? undefined : (0, path_utils_1.normalizeDirPath)(process.cwd(), true);
|
const workDir = this.artifact ? undefined : (0, path_utils_1.normalizeDirPath)(process.cwd(), true);
|
||||||
core.info(`Found ${trackedFiles.length} files tracked by GitHub`);
|
if (parseErrors)
|
||||||
|
core.info(`Found ${trackedFiles.length} files tracked by GitHub`);
|
||||||
const options = {
|
const options = {
|
||||||
workDir,
|
workDir,
|
||||||
trackedFiles,
|
trackedFiles,
|
||||||
|
|
|
||||||
|
|
@ -91,10 +91,10 @@ class TestReporter {
|
||||||
: new LocalFileProvider(this.name, pattern)
|
: new LocalFileProvider(this.name, pattern)
|
||||||
|
|
||||||
const parseErrors = this.maxAnnotations > 0
|
const parseErrors = this.maxAnnotations > 0
|
||||||
const trackedFiles = await inputProvider.listTrackedFiles()
|
const trackedFiles = parseErrors ? await inputProvider.listTrackedFiles() : []
|
||||||
const workDir = this.artifact ? undefined : normalizeDirPath(process.cwd(), true)
|
const workDir = this.artifact ? undefined : normalizeDirPath(process.cwd(), true)
|
||||||
|
|
||||||
core.info(`Found ${trackedFiles.length} files tracked by GitHub`)
|
if (parseErrors) core.info(`Found ${trackedFiles.length} files tracked by GitHub`)
|
||||||
|
|
||||||
const options: ParseOptions = {
|
const options: ParseOptions = {
|
||||||
workDir,
|
workDir,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue