@@ -21,18 +21,24 @@ runs:
21
21
path : ' **/node_modules'
22
22
# Use the combo between node version, name, and SHA-256 hash of the lock file as cache key so that
23
23
# if one of them changes the cache is invalidated/discarded
24
- key : ${{ inputs.nodeVersion }}-cache-utilities- node-modules-${{ hashFiles('./package-lock.json') }}
24
+ key : ${{ inputs.nodeVersion }}-node-modules-${{ hashFiles('./package-lock.json') }}
25
25
- name : Install dependencies
26
26
# We can skip the installation if there was a cache hit
27
27
if : steps.cache-node-modules.outputs.cache-hit != 'true'
28
28
run : npm ci
29
29
shell : bash
30
30
- name : Build packages
31
- # Regardless of whether the cache was hit or not, we need to build the packages, unless the caller says otherwise
31
+ # By default we build the packages, but we can skip this step if the caller wants to
32
32
if : inputs.build == 'true'
33
- # We build the commons and jmspath packages first, then the others in parallel to speed up the process
34
- # even though we could just run `npm run build` in the root folder and build them in
35
- # sequence, but still in the correct order.
36
- run : |
37
- npm run build
33
+ run : npm run build -w packages/commons
34
+ npm run build -w packages/jmespath
35
+ npm run build -w packages/testing
36
+ npm run build -w packages/logger & \
37
+ npm run build -w packages/tracer & \
38
+ npm run build -w packages/metrics & \
39
+ npm run build -w packages/parameters & \
40
+ npm run build -w packages/idempotency & \
41
+ npm run build -w packages/batch & \
42
+ npm run build -w packages/parser & \
43
+ npm run build -w packages/event-handler
38
44
shell : bash
0 commit comments