Skip to content

Commit

Permalink
Misc fixes + test sleep before artifact-test
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Dorner committed Feb 17, 2021
1 parent 96237b3 commit 93c3964
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
needs: build-test
steps:
- uses: actions/checkout@v2
- run: sleep 60
- uses: ./
with:
artifact: test-results
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions src/utils/github-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 93c3964

Please sign in to comment.