diff --git a/__tests__/context.test.ts b/__tests__/context.test.ts index f24a554..b1d49ec 100644 --- a/__tests__/context.test.ts +++ b/__tests__/context.test.ts @@ -32,7 +32,7 @@ describe('getInputs', () => { }); // prettier-ignore - test.each([ + const cases: [number, Map, context.Inputs][] = [ [ 0, new Map([ @@ -41,7 +41,7 @@ describe('getInputs', () => { { version: '', cacheBinary: true, - } as context.Inputs + } ], [ 1, @@ -52,18 +52,16 @@ describe('getInputs', () => { { version: 'v2.32.4', cacheBinary: false - } as context.Inputs + } ] - ])( - '[%d] given %p as inputs, returns %p', - async (num: number, inputs: Map, expected: context.Inputs) => { - inputs.forEach((value: string, name: string) => { - setInput(name, value); - }); - const res = await context.getInputs(); - expect(res).toEqual(expected); - } - ); + ]; + test.each(cases)('[%d] given %o as inputs, returns %o', async (num: number, inputs: Map, expected: context.Inputs) => { + inputs.forEach((value: string, name: string) => { + setInput(name, value); + }); + const res = await context.getInputs(); + expect(res).toEqual(expected); + }); }); // See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67 diff --git a/__tests__/setup.unit.ts b/__tests__/setup.unit.ts index e662121..e24bae5 100644 --- a/__tests__/setup.unit.ts +++ b/__tests__/setup.unit.ts @@ -2,7 +2,7 @@ import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; -const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-actions-toolkit-')); +const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-setup-compose-action-')); process.env = Object.assign({}, process.env, { TEMP: tmpDir, diff --git a/dev.Dockerfile b/dev.Dockerfile index de32889..e4f6e5a 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -3,10 +3,11 @@ ARG NODE_VERSION=20 FROM node:${NODE_VERSION}-alpine AS base -RUN apk add --no-cache cpio findutils git +RUN apk add --no-cache cpio findutils git rsync WORKDIR /src RUN --mount=type=bind,target=.,rw \ --mount=type=cache,target=/src/.yarn/cache <&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"' @@ -58,8 +68,7 @@ FROM deps AS format RUN --mount=type=bind,target=.,rw \ --mount=type=cache,target=/src/.yarn/cache \ --mount=type=cache,target=/src/node_modules \ - yarn run format \ - && mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out + yarn run format && mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out FROM scratch AS format-update COPY --from=format /out / diff --git a/tsconfig.json b/tsconfig.json index 1fc12fb..be1cc9f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,6 @@ "module": "nodenext", "moduleResolution": "nodenext", "esModuleInterop": true, - "strict": true, "newLine": "lf", "outDir": "./lib", "rootDir": "./src", diff --git a/vitest.config.ts b/vitest.config.ts index 2b8712b..b5ac930 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,19 +1,3 @@ -/** - * Copyright 2026 actions-toolkit authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import {defineConfig} from 'vitest/config'; export default defineConfig({ @@ -26,7 +10,7 @@ export default defineConfig({ provider: 'v8', reporter: ['clover'], include: ['src/**/*.ts'], - exclude: ['src/**/main.ts', '__tests__/**', 'dist/**'] + exclude: ['src/**/main.ts'] } } });