Compare commits
15 Commits
main
...
Link-/blob
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67b144e17c | ||
|
|
ae82de5d80 | ||
|
|
92c0d581d5 | ||
|
|
15ed468872 | ||
|
|
2fbb473cf9 | ||
|
|
d8dede30d8 | ||
|
|
313eb59159 | ||
|
|
07e50f1839 | ||
|
|
b4b70a7f57 | ||
|
|
b88a5b44f3 | ||
|
|
643d6d6123 | ||
|
|
f7e6edf3a0 | ||
|
|
270eaa9768 | ||
|
|
a2aae2e903 | ||
|
|
2c0830523b |
10
README.md
10
README.md
@@ -91,7 +91,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache Primes
|
||||
id: cache-primes
|
||||
@@ -122,7 +122,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Restore cached Primes
|
||||
id: cache-primes-restore
|
||||
@@ -229,7 +229,7 @@ Example:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/cache@v4
|
||||
id: cache
|
||||
@@ -259,7 +259,7 @@ jobs:
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache Primes
|
||||
id: cache-primes
|
||||
@@ -286,7 +286,7 @@ jobs:
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache Primes
|
||||
id: cache-primes
|
||||
|
||||
@@ -260,7 +260,7 @@ test("Fail restore when fail on cache miss is enabled and primary + restore keys
|
||||
);
|
||||
|
||||
expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key);
|
||||
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
|
||||
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(0);
|
||||
|
||||
expect(failedMock).toHaveBeenCalledWith(
|
||||
`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${key}`
|
||||
|
||||
@@ -86,8 +86,7 @@ test("restore with no cache found", async () => {
|
||||
);
|
||||
|
||||
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
|
||||
expect(outputMock).toHaveBeenCalledWith("cache-hit", "false");
|
||||
expect(outputMock).toHaveBeenCalledTimes(2);
|
||||
expect(outputMock).toHaveBeenCalledTimes(1);
|
||||
expect(failedMock).toHaveBeenCalledTimes(0);
|
||||
|
||||
expect(infoMock).toHaveBeenCalledWith(
|
||||
|
||||
70888
dist/restore-only/index.js
vendored
70888
dist/restore-only/index.js
vendored
File diff suppressed because one or more lines are too long
70888
dist/restore/index.js
vendored
70888
dist/restore/index.js
vendored
File diff suppressed because one or more lines are too long
70887
dist/save-only/index.js
vendored
70887
dist/save-only/index.js
vendored
File diff suppressed because one or more lines are too long
70887
dist/save/index.js
vendored
70887
dist/save/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -513,7 +513,6 @@ jobs:
|
||||
```yaml
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
|
||||
980
package-lock.json
generated
980
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -23,10 +23,10 @@
|
||||
"author": "GitHub",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^3.2.3",
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/io": "^1.1.2"
|
||||
"@actions/cache": "file:/workspaces/toolkit/packages/cache",
|
||||
"@actions/core": "file:/workspaces/toolkit/packages/core",
|
||||
"@actions/exec": "file:/workspaces/toolkit/packages/exec",
|
||||
"@actions/io": "file:/workspaces/toolkit/packages/io"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^27.5.2",
|
||||
|
||||
@@ -51,7 +51,6 @@ export async function restoreImpl(
|
||||
);
|
||||
|
||||
if (!cacheKey) {
|
||||
core.setOutput(Outputs.CacheHit, false.toString());
|
||||
if (failOnCacheMiss) {
|
||||
throw new Error(
|
||||
`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`
|
||||
@@ -63,6 +62,7 @@ export async function restoreImpl(
|
||||
...restoreKeys
|
||||
].join(", ")}`
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user