Skip to content

Commit

Permalink
ci: use fixed hashFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesilva committed Nov 12, 2019
1 parent 617a12d commit 4315be3
Showing 1 changed file with 6 additions and 29 deletions.
35 changes: 6 additions & 29 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,20 @@ jobs:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v1
# hashFiles has two bugs atm:
# - can't do individual files
# - / doesn't work on windows
# https://github.com/actions/cache/issues/39
# Unclear if we can just use the same cached yarn/maven artifacts on both though.
- name: Cache node_modules on unix
if: matrix.os != 'windows-latest'
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: unix-node_modules-${{ hashFiles('**/yarn.lock') }}
key: node_modules-${{ hashFiles('yarn.lock') }}
restore-keys: |
unix-node_modules-
- name: Cache maven on unix
node_modules-
- name: Cache maven
uses: actions/cache@v1
if: matrix.os != 'windows-latest'
with:
path: ~/.m2
key: unix-m2-${{ hashFiles('**/shadow-cljs.edn') }}
key: m2-${{ hashFiles('shadow-cljs.edn') }}
restore-keys: |
unix-m2-
- name: Cache node_modules on windows
if: matrix.os == 'windows-latest'
uses: actions/cache@v1
with:
path: node_modules
key: windows-node_modules-${{ hashFiles('**\yarn.lock') }}
restore-keys: |
windows-node_modules-
- name: Cache maven on windows
uses: actions/cache@v1
if: matrix.os == 'windows-latest'
with:
path: ~/.m2
key: windows-m2-${{ hashFiles('**\shadow-cljs.edn') }}
restore-keys: |
windows-m2-
m2-
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
Expand Down

0 comments on commit 4315be3

Please sign in to comment.