File tree Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Original file line number Diff line number Diff line change 1818 path : ~/.npm # this is cache where npm installs from before going out to the network
1919 key : ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
2020 - name : Install dependencies
21- if : steps.cacheModules.outputs.cache-hit != 'true'
22- run : npm install
21+ if : steps.cacheDist.outputs.cache-hit != 'true'
22+ run : make dist
23+
24+ build :
25+ name : Build
26+ needs : [install]
27+ runs-on : ubuntu-latest
28+ steps :
29+ - uses : actions/checkout@v4
30+ - name : Cache dist
31+ id : cacheDist
32+ uses : actions/cache@v4
33+ with :
34+ path : ./dist
35+ key : ${{ runner.os }}-node-${{ hashFiles('package.json', 'rollup.config.js', 'src/*.js') }}
36+ - name : Install dependencies
37+ if : steps.cacheDist.outputs.cache-hit != 'true'
38+ run : make dist
2339
2440 debug :
2541 name : Debug
2945
3046 checks :
3147 name : Check
32- needs : [install ]
48+ needs : [build ]
3349 uses : ./.github/workflows/checks.yml
3450 with :
3551 ref : ${{ github.sha }}
3854 # Github doesn't pass down the SNYK_TOKEN environment variable.
3955 security :
4056 name : Check Security
41- needs : [install ]
57+ needs : [build ]
4258 runs-on : ubuntu-latest
4359 steps :
4460 - uses : actions/checkout@v4
Original file line number Diff line number Diff line change @@ -22,10 +22,16 @@ jobs:
2222 - uses : actions/checkout@v4
2323 with :
2424 ref : ${{ inputs.ref }}
25- - uses : actions/cache@v4
25+ - name : Restore node modules
26+ uses : actions/cache@v4
2627 with :
2728 path : ~/.npm # this is cache where npm installs from before going out to the network
2829 key : ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
30+ - name : Restore dist
31+ uses : actions/cache@v4
32+ with :
33+ path : ./dist
34+ key : ${{ runner.os }}-node-${{ hashFiles('package.json', 'rollup.config.js', 'src/*.js') }}
2935 - name : Use Node.js ${{ matrix.node-version }}
3036 uses : actions/setup-node@v4
3137 with :
You can’t perform that action at this time.
0 commit comments