mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 13:57:09 +01:00
Misc fixes + test sleep before artifact-test
This commit is contained in:
parent
96237b3119
commit
93c3964547
5 changed files with 7 additions and 5 deletions
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
|
|
@ -40,6 +40,7 @@ jobs:
|
|||
needs: build-test
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: sleep 60
|
||||
- uses: ./
|
||||
with:
|
||||
artifact: test-results
|
||||
|
|
|
|||
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
|
|
@ -272,6 +272,7 @@ class TestReporter {
|
|||
const parseErrors = this.maxAnnotations > 0;
|
||||
const trackedFiles = await inputProvider.listTrackedFiles();
|
||||
const workDir = this.artifact ? undefined : path_utils_1.normalizeDirPath(process.cwd(), true);
|
||||
core.info(`Found ${trackedFiles.length} files tracked by GitHub`);
|
||||
const options = {
|
||||
workDir,
|
||||
trackedFiles,
|
||||
|
|
@ -1390,7 +1391,7 @@ function getCheckRunContext() {
|
|||
}
|
||||
const runId = github.context.runId;
|
||||
if (github.context.payload.pull_request) {
|
||||
core.info(`Action was triggered by ${github.context}: using SHA from head of source branch`);
|
||||
core.info(`Action was triggered by ${github.context.eventName}: using SHA from head of source branch`);
|
||||
const pr = github.context.payload.pull_request;
|
||||
return { sha: pr.head.sha, runId };
|
||||
}
|
||||
|
|
@ -1446,7 +1447,6 @@ async function listFiles(octokit, sha) {
|
|||
...github.context.repo
|
||||
});
|
||||
const files = await listGitTree(octokit, commit.data.tree.sha, '');
|
||||
core.info(`Found ${files.length} files tracked by GitHub in commit ${sha}`);
|
||||
return files;
|
||||
}
|
||||
exports.listFiles = listFiles;
|
||||
|
|
|
|||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -85,6 +85,8 @@ class TestReporter {
|
|||
const trackedFiles = await inputProvider.listTrackedFiles()
|
||||
const workDir = this.artifact ? undefined : normalizeDirPath(process.cwd(), true)
|
||||
|
||||
core.info(`Found ${trackedFiles.length} files tracked by GitHub`)
|
||||
|
||||
const options: ParseOptions = {
|
||||
workDir,
|
||||
trackedFiles,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export function getCheckRunContext(): {sha: string; runId: number} {
|
|||
|
||||
const runId = github.context.runId
|
||||
if (github.context.payload.pull_request) {
|
||||
core.info(`Action was triggered by ${github.context}: using SHA from head of source branch`)
|
||||
core.info(`Action was triggered by ${github.context.eventName}: using SHA from head of source branch`)
|
||||
const pr = github.context.payload.pull_request as EventPayloads.WebhookPayloadPullRequestPullRequest
|
||||
return {sha: pr.head.sha, runId}
|
||||
}
|
||||
|
|
@ -90,7 +90,6 @@ export async function listFiles(octokit: InstanceType<typeof GitHub>, sha: strin
|
|||
...github.context.repo
|
||||
})
|
||||
const files = await listGitTree(octokit, commit.data.tree.sha, '')
|
||||
core.info(`Found ${files.length} files tracked by GitHub in commit ${sha}`)
|
||||
return files
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue