2019-11-24 23:35:21 +07:00
|
|
|
import * as path from 'path';
|
2019-12-19 04:08:12 +07:00
|
|
|
import * as utils from './utils';
|
|
|
|
import * as io from '@actions/io';
|
2019-11-24 23:35:21 +07:00
|
|
|
|
|
|
|
/**
|
2019-12-19 04:08:12 +07:00
|
|
|
* Cache json files for problem matchers
|
2019-11-24 23:35:21 +07:00
|
|
|
*/
|
2019-12-19 04:08:12 +07:00
|
|
|
export async function addMatchers(): Promise<void> {
|
2020-02-14 02:56:09 +07:00
|
|
|
const config_path = path.join(__dirname, '..', 'src', 'configs');
|
2019-12-19 04:08:12 +07:00
|
|
|
const runner_dir: string = await utils.getInput('RUNNER_TOOL_CACHE', false);
|
2020-02-14 02:56:09 +07:00
|
|
|
await io.cp(path.join(config_path, 'phpunit.json'), runner_dir);
|
|
|
|
await io.cp(path.join(config_path, 'php.json'), runner_dir);
|
2019-11-24 23:35:21 +07:00
|
|
|
}
|