mirror of
https://github.com/threeal/cmake-action.git
synced 2026-02-01 19:40:49 +00:00
build: enable TypeScript strict configuration (#395)
* feat: utilize catched-error-message to parse catched error * test: fix typing in `inputs.test.ts` * build: enable TypeScript strict configuration * build: configure TypeScript to skip library check
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import * as core from "@actions/core";
|
||||
import { getErrorMessage } from "catched-error-message";
|
||||
import { buildProject, configureProject } from "./cmake.js";
|
||||
import { getInputs } from "./inputs.js";
|
||||
|
||||
@@ -13,5 +14,5 @@ try {
|
||||
buildProject(inputs);
|
||||
}
|
||||
} catch (err) {
|
||||
core.setFailed(err);
|
||||
core.setFailed(getErrorMessage(err));
|
||||
}
|
||||
|
||||
@@ -134,7 +134,10 @@ describe("get action inputs", () => {
|
||||
const { getInputs } = await import("./inputs.js");
|
||||
const core = await import("@actions/core");
|
||||
|
||||
const booleanInputs = { "run-build": true, ...testCase.booleanInputs };
|
||||
const booleanInputs: Record<string, boolean> = {
|
||||
"run-build": true,
|
||||
...testCase.booleanInputs,
|
||||
};
|
||||
jest.mocked(core.getBooleanInput).mockImplementation((name) => {
|
||||
return booleanInputs[name] ?? false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user