2023-02-20 10:11:15 +00:00
|
|
|
import fs from 'fs';
|
|
|
|
import os from 'os';
|
|
|
|
import path from 'path';
|
|
|
|
|
|
|
|
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-build-push-action-'));
|
|
|
|
|
2023-01-13 12:23:43 +00:00
|
|
|
process.env = Object.assign({}, process.env, {
|
2023-02-20 10:11:15 +00:00
|
|
|
TEMP: tmpDir,
|
2023-01-13 12:23:43 +00:00
|
|
|
GITHUB_REPOSITORY: 'docker/build-push-action',
|
2023-02-20 10:11:15 +00:00
|
|
|
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
|
|
|
|
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
|
2023-01-13 12:23:43 +00:00
|
|
|
}) as {
|
|
|
|
[key: string]: string;
|
|
|
|
};
|
|
|
|
|
2020-08-17 00:32:27 +00:00
|
|
|
module.exports = {
|
2020-10-19 19:17:06 +00:00
|
|
|
clearMocks: false,
|
2023-01-13 12:23:43 +00:00
|
|
|
testEnvironment: 'node',
|
2020-08-17 00:32:27 +00:00
|
|
|
moduleFileExtensions: ['js', 'ts'],
|
|
|
|
testMatch: ['**/*.test.ts'],
|
|
|
|
transform: {
|
|
|
|
'^.+\\.ts$': 'ts-jest'
|
|
|
|
},
|
2022-04-25 04:47:48 +00:00
|
|
|
moduleNameMapper: {
|
|
|
|
'^csv-parse/sync': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs'
|
|
|
|
},
|
2023-02-20 10:11:15 +00:00
|
|
|
collectCoverageFrom: ['src/**/{!(main.ts),}.ts'],
|
|
|
|
coveragePathIgnorePatterns: ['lib/', 'node_modules/', '__mocks__/', '__tests__/'],
|
2022-03-15 20:59:52 +00:00
|
|
|
verbose: true
|
2022-04-25 04:47:48 +00:00
|
|
|
};
|