Skip to content

Commit 8e019e0

Browse files
author
Orta Therox
authored
Merge pull request #1054 from oscard0m/add-cache-to-node-workflows
ci(workflow): add cache to workflows using actions/setup-node
2 parents 2988c5a + c7400ed commit 8e019e0

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ jobs:
99
- uses: actions/checkout@v2
1010
- uses: actions/setup-node@v1
1111
with:
12-
node-version: '15'
12+
node-version: "15"
13+
cache: npm
1314

1415
- run: npm ci
1516
- run: npm run build

.github/workflows/deploy.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ on:
55
branches:
66
- main
77

8-
workflow_dispatch:
9-
8+
workflow_dispatch: null
109
jobs:
1110
deploy:
1211
runs-on: ubuntu-latest
@@ -17,18 +16,18 @@ jobs:
1716
with:
1817
node-version: "15.x"
1918
registry-url: "https://registry.npmjs.org"
19+
cache: npm
2020

2121
- run: npm install
2222
- run: npm run build
2323
- run: npm test
24-
24+
2525
- name: Create packages for .d.ts files
2626
run: node deploy/createTypesPackages.mjs
27-
27+
2828
# Deploy anything which differs from the npm version of a tsconfig
29-
- name: 'Deploy built packages to NPM'
29+
- name: "Deploy built packages to NPM"
3030
run: node deploy/deployChangedPackages.mjs
3131
env:
3232
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34-

.github/workflows/test_typescript.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ jobs:
99
- uses: actions/checkout@v2
1010
- uses: actions/setup-node@v1
1111
with:
12-
node-version: '15'
12+
node-version: "15"
13+
cache: npm
1314

1415
- name: Run TypeScript Compiler Tests with new dom.d.ts
1516
run: |
@@ -39,4 +40,3 @@ jobs:
3940
run: npx danger -- ci
4041
env:
4142
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42-

.github/workflows/update-core-deps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Update core dependencies
22
on:
3-
workflow_dispatch:
3+
workflow_dispatch: null
44
schedule:
55
# https://crontab.guru/#5_8_*_*_*
66
- cron: "5 8 * * *"
@@ -14,7 +14,8 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-node@v1
1616
with:
17-
node-version: '15'
17+
node-version: "15"
18+
cache: npm
1819

1920
# Use ncu to detect major version changes
2021
- run: npm i -g npm-check-updates
@@ -32,4 +33,3 @@ jobs:
3233
title: "chore(package): update core dependencies"
3334
branch: update-core-deps
3435
token: ${{ secrets.TS_GITHUB_BOT_AUTH }}
35-

0 commit comments

Comments
 (0)