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:
Alfi Maulana
2024-08-06 15:41:09 +07:00
committed by GitHub
parent eb127dc7da
commit fe729787d8
6 changed files with 26 additions and 5 deletions

View File

@@ -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));
}

View File

@@ -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;
});