Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a903cf2

Browse filesBrowse files
committed
Add install deps action to reuse between workflows
1 parent 30d8f85 commit a903cf2
Copy full SHA for a903cf2

File tree

Expand file treeCollapse file tree

5 files changed

+18
-41
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+18
-41
lines changed
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 'Install dependencies'
2+
description: 'Set up node and install dependencies'
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- uses: actions/setup-node@v3
7+
with:
8+
node-version: '20.x'
9+
cache: npm
10+
11+
- run: npm ci

‎.github/workflows/check-dist.yml

Copy file name to clipboardExpand all lines: .github/workflows/check-dist.yml
+1-7Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v3
2222

23-
- uses: actions/setup-node@v3
24-
with:
25-
node-version: '20.x'
26-
cache: npm
27-
28-
- name: Install dependencies
29-
run: npm ci
23+
- uses: ./.github/actions/install-dependencies
3024

3125
- name: Rebuild the dist/ directory
3226
run: npm run build

‎.github/workflows/ci.yml

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
14-
- uses: actions/setup-node@v3
15-
with:
16-
node-version: '20.x'
17-
cache: npm
18-
- run: npm ci
14+
- uses: ./.github/actions/install-dependencies
1915
- run: npm run style:check
2016
- run: npm test

‎.github/workflows/integration.yml

Copy file name to clipboardExpand all lines: .github/workflows/integration.yml
+4-24Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,7 @@ jobs:
5050
runs-on: ubuntu-latest
5151
steps:
5252
- uses: actions/checkout@v3
53-
- uses: actions/cache@v3
54-
with:
55-
path: ~/.npm
56-
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
57-
restore-keys: ${{runner.os}}-npm-
58-
- run: npm ci
53+
- uses: ./.github/actions/install-dependencies
5954
- id: npm-require
6055
uses: ./
6156
with:
@@ -75,12 +70,7 @@ jobs:
7570
runs-on: ubuntu-latest
7671
steps:
7772
- uses: actions/checkout@v3
78-
- uses: actions/cache@v3
79-
with:
80-
path: ~/.npm
81-
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
82-
restore-keys: ${{runner.os}}-npm-
83-
- run: npm ci
73+
- uses: ./.github/actions/install-dependencies
8474
- id: previews-default
8575
name: Default previews not set
8676
uses: ./
@@ -133,12 +123,7 @@ jobs:
133123
runs-on: ubuntu-latest
134124
steps:
135125
- uses: actions/checkout@v3
136-
- uses: actions/cache@v3
137-
with:
138-
path: ~/.npm
139-
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
140-
restore-keys: ${{runner.os}}-npm-
141-
- run: npm ci
126+
- uses: ./.github/actions/install-dependencies
142127
- id: user-agent-default
143128
name: Default user-agent not set
144129
uses: ./
@@ -195,12 +180,7 @@ jobs:
195180
runs-on: ubuntu-latest
196181
steps:
197182
- uses: actions/checkout@v3
198-
- uses: actions/cache@v3
199-
with:
200-
path: ~/.npm
201-
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
202-
restore-keys: ${{runner.os}}-npm-
203-
- run: npm ci
183+
- uses: ./.github/actions/install-dependencies
204184
- id: debug-default
205185
name: Default debug not set
206186
uses: ./

‎.github/workflows/licensed.yml

Copy file name to clipboardExpand all lines: .github/workflows/licensed.yml
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,5 @@ jobs:
2020
- uses: jonabc/setup-licensed@82c5f4d19e8968efa74a25b132922382c2671fe2
2121
with:
2222
version: '3.x'
23-
- uses: actions/setup-node@v3
24-
with:
25-
node-version: '20.x'
26-
cache: npm
27-
- run: npm ci
23+
- uses: ./.github/actions/install-dependencies
2824
- run: licensed status

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.