File tree 1 file changed +52
-1
lines changed
1 file changed +52
-1
lines changed Original file line number Diff line number Diff line change 8
8
9
9
jobs :
10
10
11
+ webui :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Check out Git repository
15
+ uses : actions/checkout@v2
16
+
17
+ - name : Install Node.js
18
+ uses : actions/setup-node@v2
19
+ with :
20
+ node-version : ' lts/*'
21
+
22
+ - name : Cache webui
23
+ uses : actions/cache@v2
24
+ id : webui-cache
25
+ with :
26
+ path : assets/webui
27
+ key : ${{ hashFiles('package.json') }} # webui CID is defined in this file
28
+
29
+ - name : Cache bigger downloads
30
+ uses : actions/cache@v2
31
+ id : cache
32
+ if : steps.webui-cache.outputs.cache-hit != 'true'
33
+ with :
34
+ path : ${{ github.workspace }}/.cache
35
+ key : ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'electron-builder.yml') }}
36
+ restore-keys : |
37
+ ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'electron-builder.yml') }}
38
+ ${{ runner.os }}-
39
+
40
+ - name : Install dependencies and fetch ipfs-webui
41
+ if : steps.webui-cache.outputs.cache-hit != 'true'
42
+ run : |
43
+ npm ci --prefer-offline --no-audit --progress=false --cache ${{ github.workspace }}/.cache/npm
44
+ npm run clean
45
+ npm run webui
46
+
47
+ - name : Attach cached ipfs-webui to Github Action
48
+ uses : actions/upload-artifact@v2
49
+ with :
50
+ name : ipfs-webui
51
+ path : assets/webui
52
+ if-no-files-found : error
53
+
11
54
test :
12
55
runs-on : ${{ matrix.os }}
56
+ needs : webui
13
57
strategy :
14
58
fail-fast : false
15
59
matrix :
22
66
- name : Install Node.js
23
67
uses : actions/setup-node@v2
24
68
with :
25
- node-version : ' 14'
69
+ node-version : ' lts/*'
70
+
71
+ - name : Cache webui
72
+ uses : actions/cache@v2
73
+ id : webui-cache
74
+ with :
75
+ path : assets/webui
76
+ key : ${{ hashFiles('package.json') }}
26
77
27
78
- name : Cache bigger downloads
28
79
uses : actions/cache@v2
You can’t perform that action at this time.
0 commit comments