()
| 13 | import {GitClient} from '../utils/git/git-client.js'; |
| 14 | |
| 15 | export async function verify() { |
| 16 | const git = await GitClient.get(); |
| 17 | /** Full path to NgBot config file */ |
| 18 | const NGBOT_CONFIG_YAML_PATH = resolve(git.baseDir, '.github/angular-robot.yml'); |
| 19 | |
| 20 | /** The NgBot config file */ |
| 21 | const ngBotYaml = readFileSync(NGBOT_CONFIG_YAML_PATH, 'utf8'); |
| 22 | |
| 23 | try { |
| 24 | // Try parsing the config file to verify that the syntax is correct. |
| 25 | parseYaml(ngBotYaml); |
| 26 | Log.info(green('✔ Valid NgBot YAML config')); |
| 27 | } catch (e) { |
| 28 | Log.error(`! Invalid NgBot YAML config`); |
| 29 | Log.error(e); |
| 30 | process.exitCode = 1; |
| 31 | } |
| 32 | } |
no test coverage detected