Skip to content

Commit

Permalink
feat(circleci): target all YAML files in .circleci directory (#27809)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkniewallner committed Mar 8, 2024
1 parent 0497dbd commit d2f4a1c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions lib/modules/manager/circleci/index.spec.ts
@@ -0,0 +1,24 @@
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);
});
});
});
2 changes: 1 addition & 1 deletion lib/modules/manager/circleci/index.ts
Expand Up @@ -10,7 +10,7 @@ export const displayName = 'CircleCI';
export const url = 'https://circleci.com/docs/configuration-reference';

export const defaultConfig = {
fileMatch: ['(^|/)\\.circleci/config\\.ya?ml$'],
fileMatch: ['(^|/)\\.circleci/.+\\.ya?ml$'],
};

export const categories: Category[] = ['ci'];
Expand Down

0 comments on commit d2f4a1c

Please sign in to comment.