Skip to content

Commit

Permalink
wrong node version
Browse files Browse the repository at this point in the history
  • Loading branch information
atlowChemi committed Feb 26, 2023
1 parent 07b2143 commit 634828e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ inputs:
default: 'false'

runs:
using: 'node18'
using: 'node16'
main: 'lib/index.js'
10 changes: 5 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13654,8 +13654,8 @@ async function parseFile(file) {
return parseSuite(report);
}
async function parseSuite({ testsuites: { testsuite } = {} } = {}) {
const result = { totalCount: 0, skipped: 0, failedEvaluating: parseInt(testsuite?.["failure-evaluating"] || "0") || 0, annotations: [] };
if (!testsuite?.testcase) {
const result = { totalCount: 0, skipped: 0, failedEvaluating: parseInt((testsuite == null ? void 0 : testsuite["failure-evaluating"]) || "0") || 0, annotations: [] };
if (!(testsuite == null ? void 0 : testsuite.testcase)) {
return result;
}
for (const { failure, skipped, name, ["system-out"]: systemOut, classname } of testsuite.testcase) {
Expand All @@ -13667,7 +13667,7 @@ async function parseSuite({ testsuites: { testsuite } = {} } = {}) {
result.annotations.push({
annotation_level: success ? "notice" : "failure",
title: escapeEmoji(name),
message: escapeEmoji((failure?.message || name).trim()),
message: escapeEmoji(((failure == null ? void 0 : failure.message) || name).trim()),
classname: escapeEmoji(classname),
resultLink: systemOut
});
Expand Down Expand Up @@ -13731,9 +13731,9 @@ async function getTestReports(inputs) {
throw new NoTestsFoundError(`\u274C No test results found for ${inputs.checkName}`);
}
const pullRequest = github.context.payload.pull_request;
const link = pullRequest?.html_url || github.context.ref;
const link = (pullRequest == null ? void 0 : pullRequest.html_url) || github.context.ref;
const conclusion = accumulateResult.failed <= 0 ? "success" : "failure";
const headSha = inputs.commit || pullRequest?.head.sha || github.context.sha;
const headSha = inputs.commit || (pullRequest == null ? void 0 : pullRequest.head.sha) || github.context.sha;
core3.info(`\u2139\uFE0F Posting with conclusion '${conclusion}' to ${link} (sha: ${headSha})`);
core3.endGroup();
return {
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"scripts": {
"type-check": "tsc --noEmit",
"build": "esbuild src/index.ts --bundle --platform=node --target=node18 --outfile=lib/index.js --sourcemap",
"build": "esbuild src/index.ts --bundle --platform=node --target=node16 --outfile=lib/index.js --sourcemap",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
Expand Down

0 comments on commit 634828e

Please sign in to comment.