Merge branch 'master' into rust-example

This commit is contained in:
Linda_pp 2019-11-02 07:57:43 +09:00 committed by GitHub
commit aea825e76e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 18 deletions

View file

@ -5,7 +5,7 @@ on:
branches:
- master
paths-ignore:
- '**/*.md'
- '**.md'
jobs:
test:

View file

@ -59,7 +59,7 @@ See [Examples](examples.md)
## Cache Limits
Individual caches are limited to 200MB and a repository can have up to 2GB of caches. Once the 2GB limit is reached, older caches will be evicted based on when the cache was last accessed.
Individual caches are limited to 200MB and a repository can have up to 2GB of caches. Once the 2GB limit is reached, older caches will be evicted based on when the cache was last accessed. Caches that are not accessed within the last week will also be evicted.
## Skipping steps based on cache-hit

View file

@ -8,6 +8,7 @@
- [Swift, Objective-C - Carthage](#swift-objective-c---carthage)
- [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods)
- [Ruby - Gem](#ruby---gem)
- [Go - Modules](#go---modules)
- [Rust - Cargo](#rust---cargo)
## Node - npm
@ -98,6 +99,17 @@ uses: actions/cache@preview
${{ runner.os }}-gem-
```
## Go - Modules
```yaml
- uses: actions/cache@preview
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
```
## Rust - Cargo
```
@ -116,4 +128,4 @@ uses: actions/cache@preview
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
```
```

View file

@ -94,13 +94,6 @@ async function run() {
core.info(
`Cache restored from key:${cacheEntry && cacheEntry.cacheKey}`
);
try {
core.info("Cache Checksum:");
await exec(`md5sum`, [`${archivePath}`]);
} catch (error) {
core.debug(`Failed to checkum with ${error}`);
}
} catch (error) {
core.warning(error.message);
utils.setCacheHitOutput(false);

View file

@ -66,13 +66,6 @@ async function run() {
const stream = fs.createReadStream(archivePath);
await cacheHttpClient.saveCache(stream, primaryKey);
try {
core.info("Cache Checksum:");
await exec(`md5sum`, [`${archivePath}`]);
} catch (error) {
core.debug(`Failed to checkum with ${error}`);
}
} catch (error) {
core.warning(error.message);
}

View file

@ -72,7 +72,7 @@ export function resolvePath(filePath: string): string {
if (filePath[0] === "~") {
const home = os.homedir();
if (!home) {
throw new Error("Unable to resole `~` to HOME");
throw new Error("Unable to resolve `~` to HOME");
}
return path.join(home, filePath.slice(1));
}