Skip to content

Commit

Permalink
cache ~/.npm for making npm ci faster
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Nov 26, 2019
1 parent 295e8cb commit ccb5e78
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run build
- name: Save previous data.js
Expand All @@ -34,6 +38,10 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-go@v1
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run build
- name: Save previous data.js
Expand All @@ -58,6 +66,10 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run build
- name: Save previous data.js
Expand All @@ -83,6 +95,10 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-python@v1
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run build
- name: Save previous data.js
Expand Down Expand Up @@ -110,6 +126,10 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run build
- uses: actions/setup-go@v1
Expand Down Expand Up @@ -140,6 +160,10 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run lint
- run: npm run build
Expand Down

0 comments on commit ccb5e78

Please sign in to comment.