File tree Expand file tree Collapse file tree 3 files changed +69
-78
lines changed Expand file tree Collapse file tree 3 files changed +69
-78
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -27,13 +27,39 @@ jobs:
27
27
- name : Checkout repo
28
28
uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29
29
30
- - name : Setup pnpm
31
- uses : ./.github/ actions/setup-pnpm
30
+ - name : Setup Node.js
31
+ uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
32
32
with :
33
33
node-version : ' 22'
34
- pnpm-version : ' ^10.16.0'
35
- install-deps : ' true'
36
- socket-scan : ' false'
34
+
35
+ - name : Setup PNPM
36
+ uses : pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
37
+ with :
38
+ version : ' ^10.16.0'
39
+
40
+ - name : Get pnpm store directory
41
+ id : pnpm-cache
42
+ shell : bash
43
+ run : echo "store-path=$(pnpm store path)" >> $GITHUB_OUTPUT
44
+
45
+ - name : Generate cache prefix
46
+ id : pnpm-timed-expiration
47
+ shell : bash
48
+ # Change cache prefix every 120 days.
49
+ run : echo "prefix=$(( $(date +%s) / 60 / 60 / 24 / 120 ))" >> $GITHUB_OUTPUT
50
+
51
+ - name : Cache pnpm
52
+ uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
53
+ with :
54
+ path : ${{ steps.pnpm-cache.outputs.store-path }}
55
+ # Cache key based on pnpm-lock.yaml hash and timed prefix.
56
+ key : ${{ runner.os }}-pnpm-store-${{ steps.pnpm-timed-expiration.outputs.prefix }}-${{ hashFiles('pnpm-lock.yaml') }}
57
+ restore-keys : |
58
+ ${{ runner.os }}-pnpm-store-${{ steps.pnpm-timed-expiration.outputs.prefix }}-
59
+
60
+ - name : Install dependencies
61
+ shell : bash
62
+ run : pnpm install
37
63
38
64
- name : Run Socket Fix CLI
39
65
env :
Original file line number Diff line number Diff line change @@ -28,11 +28,46 @@ jobs:
28
28
os : [ubuntu-latest, windows-latest]
29
29
steps :
30
30
- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
31
- - name : Setup PNPM
32
- uses : ./.github/actions/setup-pnpm
31
+
32
+ - name : Setup Node.js
33
+ uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
33
34
with :
34
35
node-version : ${{ matrix.node-version }}
35
- pnpm-version : ' ^10.16.0'
36
+
37
+ - name : Setup PNPM
38
+ uses : pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
39
+ with :
40
+ version : ' ^10.16.0'
41
+
42
+ - name : Get pnpm store directory
43
+ id : pnpm-cache
44
+ shell : bash
45
+ run : echo "store-path=$(pnpm store path)" >> $GITHUB_OUTPUT
46
+
47
+ - name : Generate cache prefix
48
+ id : pnpm-timed-expiration
49
+ shell : bash
50
+ # Change cache prefix every 120 days.
51
+ run : echo "prefix=$(( $(date +%s) / 60 / 60 / 24 / 120 ))" >> $GITHUB_OUTPUT
52
+
53
+ - name : Cache pnpm
54
+ uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
55
+ with :
56
+ path : ${{ steps.pnpm-cache.outputs.store-path }}
57
+ # Cache key based on pnpm-lock.yaml hash and timed prefix.
58
+ key : ${{ runner.os }}-pnpm-store-${{ steps.pnpm-timed-expiration.outputs.prefix }}-${{ hashFiles('pnpm-lock.yaml') }}
59
+ restore-keys : |
60
+ ${{ runner.os }}-pnpm-store-${{ steps.pnpm-timed-expiration.outputs.prefix }}-
61
+
62
+ - name : Socket security scan
63
+ shell : bash
64
+ run : pnpm dlx @socketsecurity/cli --config '{"settings":{"reportLevel":"error"}}' npm install --no-audit --no-fund --package-lock-only
65
+
66
+ - name : Install dependencies with pnpm
67
+ shell : bash
68
+ run : |
69
+ rm -f package-lock.json
70
+ pnpm install
36
71
37
72
- name : Run tests
38
73
run : pnpm run test-ci
You can’t perform that action at this time.
0 commit comments