mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-10-09 08:56:12 +00:00
feat: respect working_directory for files globs; add input and tests (#667)
This commit is contained in:
parent
14820f2cee
commit
4db716b167
4 changed files with 50 additions and 8 deletions
|
@ -128,6 +128,7 @@ describe('util', () => {
|
|||
github_ref: '',
|
||||
github_repository: '',
|
||||
github_token: '',
|
||||
input_working_directory: undefined,
|
||||
input_append_body: false,
|
||||
input_body: undefined,
|
||||
input_body_path: undefined,
|
||||
|
@ -156,6 +157,7 @@ describe('util', () => {
|
|||
github_ref: '',
|
||||
github_repository: '',
|
||||
github_token: '',
|
||||
input_working_directory: undefined,
|
||||
input_append_body: false,
|
||||
input_body: undefined,
|
||||
input_body_path: undefined,
|
||||
|
@ -183,6 +185,7 @@ describe('util', () => {
|
|||
github_ref: '',
|
||||
github_repository: '',
|
||||
github_token: '',
|
||||
input_working_directory: undefined,
|
||||
input_append_body: false,
|
||||
input_body: undefined,
|
||||
input_body_path: undefined,
|
||||
|
@ -211,6 +214,7 @@ describe('util', () => {
|
|||
github_ref: '',
|
||||
github_repository: '',
|
||||
github_token: '',
|
||||
input_working_directory: undefined,
|
||||
input_append_body: false,
|
||||
input_body: undefined,
|
||||
input_body_path: undefined,
|
||||
|
@ -243,6 +247,7 @@ describe('util', () => {
|
|||
github_ref: '',
|
||||
github_repository: '',
|
||||
github_token: 'env-token',
|
||||
input_working_directory: undefined,
|
||||
input_append_body: false,
|
||||
input_body: undefined,
|
||||
input_body_path: undefined,
|
||||
|
@ -272,6 +277,7 @@ describe('util', () => {
|
|||
github_ref: '',
|
||||
github_repository: '',
|
||||
github_token: 'input-token',
|
||||
input_working_directory: undefined,
|
||||
input_append_body: false,
|
||||
input_body: undefined,
|
||||
input_body_path: undefined,
|
||||
|
@ -300,6 +306,7 @@ describe('util', () => {
|
|||
github_ref: '',
|
||||
github_repository: '',
|
||||
github_token: '',
|
||||
input_working_directory: undefined,
|
||||
input_append_body: false,
|
||||
input_body: undefined,
|
||||
input_body_path: undefined,
|
||||
|
@ -327,6 +334,7 @@ describe('util', () => {
|
|||
github_ref: '',
|
||||
github_repository: '',
|
||||
github_token: '',
|
||||
input_working_directory: undefined,
|
||||
input_append_body: false,
|
||||
input_body: undefined,
|
||||
input_body_path: undefined,
|
||||
|
@ -354,6 +362,7 @@ describe('util', () => {
|
|||
github_ref: '',
|
||||
github_repository: '',
|
||||
github_token: '',
|
||||
input_working_directory: undefined,
|
||||
input_append_body: true,
|
||||
input_body: undefined,
|
||||
input_body_path: undefined,
|
||||
|
@ -388,6 +397,10 @@ describe('util', () => {
|
|||
'tests/data/foo/bar.txt',
|
||||
]);
|
||||
});
|
||||
|
||||
it('resolves files relative to working_directory', async () => {
|
||||
assert.deepStrictEqual(paths(['data/**/*'], 'tests'), ['tests/data/foo/bar.txt']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('unmatchedPatterns', () => {
|
||||
|
@ -397,6 +410,12 @@ describe('util', () => {
|
|||
['tests/data/does/not/exist/*'],
|
||||
);
|
||||
});
|
||||
|
||||
it('resolves unmatched relative to working_directory', async () => {
|
||||
assert.deepStrictEqual(unmatchedPatterns(['data/does/not/exist/*'], 'tests'), [
|
||||
'data/does/not/exist/*',
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('replaceSpacesWithDots', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue