Compare commits

..
Author SHA1 Message Date
Shubham TiwariandGitHub 017007559c review comment to add validation as errors handling 2022-06-21 07:22:33 +00:00
Shubham TiwariandGitHub 7b1bc1f56a Review comments 2022-06-20 08:48:14 +00:00
Shubham TiwariandGitHub babb9fb0bc removed line 2022-06-20 08:06:16 +00:00
Shubham TiwariandGitHub 0bde6ed088 adding message field 2022-06-20 08:00:59 +00:00
Shubham TiwariandGitHub 5008429d2a Unused package 2022-06-20 04:58:58 +00:00
Shubham TiwariandGitHub 8c47ec23fe Format 2022-06-20 04:54:54 +00:00
Shubham TiwariandGitHub 639c79e4a4 added info error as well 2022-06-20 04:47:59 +00:00
Shubham TiwariandGitHub e051715283 Initial changes 2022-06-20 04:22:20 +00:00
9 changed files with 6395 additions and 7159 deletions
+6379 -7129
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -24,7 +24,7 @@
"eslint-plugin-jest": "^22.21.0",
"flow-bin": "^0.115.0",
"jest": "^27.2.5",
"lerna": "^5.2.0",
"lerna": "^4.0.0",
"prettier": "^1.19.1",
"ts-jest": "^27.0.5",
"typescript": "^3.9.9"
+1 -4
View File
@@ -67,7 +67,4 @@
- Fix to avoid saving empty cache when no files are available for caching. ([issue](https://github.com/actions/cache/issues/624))
### 2.0.6
- Fix `Tar failed with error: The process '/usr/bin/tar' failed with exit code 1` issue when temp directory where tar is getting created is actually the subdirectory of the path mentioned by the user for caching. ([issue](https://github.com/actions/cache/issues/689))
### 3.0.0
- Updated actions/cache to suppress Actions cache server error and log warning for those error [#1122](https://github.com/actions/toolkit/pull/1122)
- Fix `Tar failed with error: The process '/usr/bin/tar' failed with exit code 1` issue when temp directory where tar is getting created is actually the subdirectory of the path mentioned by the user for caching. ([issue](https://github.com/actions/cache/issues/689))
-6
View File
@@ -32,9 +32,3 @@ test('assertDefined throws if undefined', () => {
test('assertDefined returns value', () => {
expect(cacheUtils.assertDefined('test', 5)).toBe(5)
})
test('resolvePaths works on github workspace directory', async () => {
const workspace = process.env['GITHUB_WORKSPACE'] ?? '.'
const paths = await cacheUtils.resolvePaths([workspace])
expect(paths.length).toBeGreaterThan(0)
})
+4 -4
View File
@@ -50,7 +50,7 @@ test('zstd extract tar', async () => {
`"${defaultTarPath}"`,
[
'--use-compress-program',
'unzstd --long=30',
'zstd -d --long=30',
'-xf',
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
'-P',
@@ -140,7 +140,7 @@ test('zstd create tar', async () => {
[
'--posix',
'--use-compress-program',
'zstdmt --long=30',
'zstd -T0 --long=30',
'-cf',
IS_WINDOWS ? CacheFilename.Zstd.replace(/\\/g, '/') : CacheFilename.Zstd,
'--exclude',
@@ -210,7 +210,7 @@ test('zstd list tar', async () => {
`"${defaultTarPath}"`,
[
'--use-compress-program',
'unzstd --long=30',
'zstd -d --long=30',
'-tf',
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
'-P'
@@ -235,7 +235,7 @@ test('zstdWithoutLong list tar', async () => {
`"${defaultTarPath}"`,
[
'--use-compress-program',
'unzstd',
'zstd -d',
'-tf',
IS_WINDOWS ? archivePath.replace(/\\/g, '/') : archivePath,
'-P'
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@actions/cache",
"version": "3.0.0",
"version": "2.0.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@actions/cache",
"version": "3.0.0",
"version": "2.0.6",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.6",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/cache",
"version": "3.0.0",
"version": "2.0.6",
"preview": true,
"description": "Actions cache lib",
"keywords": [
+1 -6
View File
@@ -52,12 +52,7 @@ export async function resolvePaths(patterns: string[]): Promise<string[]> {
.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
core.debug(`Matched: ${relativeFile}`)
// Paths are made relative so the tar entries are all relative to the root of the workspace.
if (relativeFile === '') {
// path.relative returns empty string if workspace and file are equal
paths.push('.')
} else {
paths.push(`${relativeFile}`)
}
paths.push(`${relativeFile}`)
}
return paths
+6 -6
View File
@@ -67,9 +67,9 @@ export async function extractTar(
function getCompressionProgram(): string[] {
switch (compressionMethod) {
case CompressionMethod.Zstd:
return ['--use-compress-program', 'unzstd --long=30']
return ['--use-compress-program', 'zstd -d --long=30']
case CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'unzstd']
return ['--use-compress-program', 'zstd -d']
default:
return ['-z']
}
@@ -106,9 +106,9 @@ export async function createTar(
function getCompressionProgram(): string[] {
switch (compressionMethod) {
case CompressionMethod.Zstd:
return ['--use-compress-program', 'zstdmt --long=30']
return ['--use-compress-program', 'zstd -T0 --long=30']
case CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'zstdmt']
return ['--use-compress-program', 'zstd -T0']
default:
return ['-z']
}
@@ -140,9 +140,9 @@ export async function listTar(
function getCompressionProgram(): string[] {
switch (compressionMethod) {
case CompressionMethod.Zstd:
return ['--use-compress-program', 'unzstd --long=30']
return ['--use-compress-program', 'zstd -d --long=30']
case CompressionMethod.ZstdWithoutLong:
return ['--use-compress-program', 'unzstd']
return ['--use-compress-program', 'zstd -d']
default:
return ['-z']
}