Skip to content
Snippets Groups Projects
Unverified Commit d2f4a1cd authored by Mathieu Kniewallner's avatar Mathieu Kniewallner Committed by GitHub
Browse files

feat(circleci): target all YAML files in `.circleci` directory (#27809)

parent 0497dbdb
No related branches found
No related tags found
No related merge requests found
import { regexMatches } from '../../../../test/util';
import { defaultConfig } from '.';
describe('modules/manager/circleci/index', () => {
describe('file names match fileMatch', () => {
it.each`
path | expected
${'.circleci/config.yml'} | ${true}
${'.circleci/config.yaml'} | ${true}
${'.circleci/foo.yaml'} | ${true}
${'.circleci/foo.yml'} | ${true}
${'.circleci/foo/config.yaml'} | ${true}
${'.circleci/foo/bar.yml'} | ${true}
${'foo/.circleci/bar.yaml'} | ${true}
${'foo.yml'} | ${false}
${'circleci/foo.yml'} | ${false}
${'circleci/foo.yml'} | ${false}
${'.circleci_foo/bar.yml'} | ${false}
${'.circleci/foo.toml'} | ${false}
`('regexMatches("$path") === $expected', ({ path, expected }) => {
expect(regexMatches(path, defaultConfig.fileMatch)).toBe(expected);
});
});
});
...@@ -10,7 +10,7 @@ export const displayName = 'CircleCI'; ...@@ -10,7 +10,7 @@ export const displayName = 'CircleCI';
export const url = 'https://circleci.com/docs/configuration-reference'; export const url = 'https://circleci.com/docs/configuration-reference';
export const defaultConfig = { export const defaultConfig = {
fileMatch: ['(^|/)\\.circleci/config\\.ya?ml$'], fileMatch: ['(^|/)\\.circleci/.+\\.ya?ml$'],
}; };
export const categories: Category[] = ['ci']; export const categories: Category[] = ['ci'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment