-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
231 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import {join} from 'path' | ||
import * as inputs from '../src/inputs' | ||
|
||
describe('Resolve path', () => { | ||
it('should return a valid path - Full path', async () => { | ||
const expected = '__tests__/resources/vscode_diff_viewer_1.1.2.zip' | ||
const path = await inputs.resolvePath( | ||
'__tests__/resources/vscode_diff_viewer_1.1.2.zip' | ||
) | ||
expect(path).toMatch(expected) | ||
}) | ||
it('should return a valid path - Full path with wildcard', async () => { | ||
const expected = join( | ||
'__tests__', | ||
'resources', | ||
'vscode_diff_viewer_1.1.2.zip' | ||
) | ||
const path = await inputs.resolvePath( | ||
'__tests__/resources/vscode_diff_viewer_*.zip' | ||
) | ||
expect(path).toMatch(expected) | ||
}) | ||
it('should return a valid path - Any folder', async () => { | ||
const expected = join( | ||
'__tests__', | ||
'resources', | ||
'vscode_diff_viewer_1.1.2.zip' | ||
) | ||
const path = await inputs.resolvePath('**/vscode_diff_viewer_1.1.2.zip') | ||
expect(path).toMatch(expected) | ||
}) | ||
it('should return a valid path - Any folder with wildcard', async () => { | ||
const expected = join( | ||
'__tests__', | ||
'resources', | ||
'vscode_diff_viewer_1.1.2.zip' | ||
) | ||
const path = await inputs.resolvePath('**/vscode_diff_viewer_*.zip') | ||
expect(path).toMatch(expected) | ||
}) | ||
it('should not find any path - Invalid full path', async () => { | ||
const path = await inputs.resolvePath( | ||
'__tests__/resources/vscode_diff_viewer_1.1.2.tar.gz' | ||
) | ||
expect(path).toBeUndefined() | ||
}) | ||
it('should not find any path - Invalid path with wildcard', async () => { | ||
const path = await inputs.resolvePath( | ||
'__tests__/resources/vscode_diff_viewer_*.tar.gz' | ||
) | ||
expect(path).toBeUndefined() | ||
}) | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,11 @@ | |
│ ├─ repository: https://github.com/actions/toolkit | ||
│ ├─ path: /home/guilherme/dev/caponetto/less-is-more/node_modules/@actions/github | ||
│ └─ licenseFile: /home/guilherme/dev/caponetto/less-is-more/node_modules/@actions/github/README.md | ||
├─ @actions/[email protected] | ||
│ ├─ licenses: MIT | ||
│ ├─ repository: https://github.com/actions/toolkit | ||
│ ├─ path: /home/guilherme/dev/caponetto/less-is-more/node_modules/@actions/glob | ||
│ └─ licenseFile: /home/guilherme/dev/caponetto/less-is-more/node_modules/@actions/glob/LICENSE.md | ||
├─ @actions/[email protected] | ||
│ ├─ licenses: MIT | ||
│ ├─ repository: https://github.com/actions/http-client | ||
|
@@ -2898,7 +2903,7 @@ | |
│ ├─ url: lukeed.com | ||
│ ├─ path: /home/guilherme/dev/caponetto/less-is-more/node_modules/kleur | ||
│ └─ licenseFile: /home/guilherme/dev/caponetto/less-is-more/node_modules/kleur/license | ||
├─ [email protected].4 | ||
├─ [email protected].5 | ||
│ ├─ licenses: MIT | ||
│ ├─ repository: https://github.com/caponetto/less-is-more | ||
│ ├─ publisher: Guilherme H. Caponetto | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export interface Artifact { | ||
name: string | ||
repository?: RepositoryInfo | ||
size?: number | ||
} | ||
|
||
export type SizeCheckResult = | ||
| 'decreased' | ||
| 'same' | ||
| 'increase_allowed' | ||
| 'increase_not_allowed' | ||
|
||
export interface WorkflowArgs { | ||
releasedArtifactName: string | ||
artifactPath: string | ||
maxIncreasePercentage: number | ||
repository: RepositoryInfo | ||
token?: string | ||
} | ||
|
||
export interface RepositoryInfo { | ||
owner: string | ||
name: string | ||
} |
Oops, something went wrong.