chore: cache ~/.pkg-cache in Travis CI and Appveyor CI (#1598)

Looks like pkg downloads node binaries from GitHub Releases, and GitHub
may impose a rate limiting if we download too many things from them in a
short period of time (likely to happen when there are many concurrent
PRs).

In order to mitigate this issue, this commit adds `$HOME/.pkg-cache`,
the directory where pkg stores node binaries, to the CI services cache.

See: https://github.com/resin-io/etcher/pull/1594
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit is contained in:
Juan Cruz Viotti 2017-07-14 11:48:45 -04:00 committed by GitHub
parent 2a8e91190c
commit 76b6bdfd06
2 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@ cache:
- $HOME/.npm/_prebuilds
- $HOME/Library/Caches/electron
- $HOME/Library/Caches/electron-builder
- $HOME/.pkg-cache
- node_modules
services:

View File

@ -8,6 +8,7 @@ cache:
- '%LOCALAPPDATA%\electron\Cache'
- '%LOCALAPPDATA%\electron-builder\cache'
- '%AppData%\npm-cache'
- '%USERPROFILE%\.pkg-cache'
- node_modules -> npm-shrinkwrap.json
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml