File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Setup
2+ description : Setup Node.js and pnpm, then install dependencies
3+
4+ inputs :
5+ node-version-file :
6+ description : Path to the file containing the Node.js version (package.json with engines.node)
7+ required : false
8+ default : package.json
9+ cache-dependency-path :
10+ description : Path to the pnpm lockfile used for caching
11+ required : false
12+ default : pnpm-lock.yaml
13+ package-json-file :
14+ description : Path to the package.json containing the packageManager field
15+ required : false
16+ default : package.json
17+ working-directory :
18+ description : Working directory in which to run pnpm install
19+ required : false
20+ default : .
21+
22+ runs :
23+ using : composite
24+ steps :
25+ - name : Install pnpm
26+ uses : pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
27+ with :
28+ package_json_file : ${{ inputs.package-json-file }}
29+
30+ - name : Setup Node.js
31+ uses : actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
32+ with :
33+ node-version-file : ${{ inputs.node-version-file }}
34+ registry-url : ' https://registry.npmjs.org'
35+ cache : pnpm
36+ cache-dependency-path : ${{ inputs.cache-dependency-path }}
37+
38+ - name : Install dependencies
39+ working-directory : ${{ inputs.working-directory }}
40+ shell : bash
41+ run : pnpm install --frozen-lockfile
Original file line number Diff line number Diff line change @@ -17,11 +17,13 @@ jobs:
1717 steps :
1818 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1919
20- - name : Setup Node.js and pnpm
21- uses : shop/ setup-javascript-action@main
20+ - name : Setup Node.js, pnpm, and install dependencies
21+ uses : ./.github/actions/ setup
2222 with :
2323 node-version-file : platforms/react-native/package.json
2424 cache-dependency-path : platforms/react-native/pnpm-lock.yaml
25+ package-json-file : platforms/react-native/package.json
26+ working-directory : platforms/react-native
2527
2628 - name : Cache turbo build setup
2729 uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
3133 restore-keys : |
3234 ${{ runner.os }}-turbo-
3335
34- - name : Install dependencies
35- run : pnpm install --frozen-lockfile
36-
3736 - name : Build module and compare snapshot
3837 run : |
3938 pnpm module clean
Original file line number Diff line number Diff line change @@ -24,11 +24,13 @@ jobs:
2424 steps :
2525 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2626
27- - name : Setup Node.js and pnpm
28- uses : shop/ setup-javascript-action@main
27+ - name : Setup Node.js, pnpm, and install dependencies
28+ uses : ./.github/actions/ setup
2929 with :
3030 node-version-file : platforms/react-native/package.json
3131 cache-dependency-path : platforms/react-native/pnpm-lock.yaml
32+ package-json-file : platforms/react-native/package.json
33+ working-directory : platforms/react-native
3234
3335 - name : Cache turbo build setup
3436 uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
3840 restore-keys : |
3941 ${{ runner.os }}-turbo-
4042
41- - name : Install dependencies
42- run : pnpm install --frozen-lockfile
43-
4443 - name : Build module
4544 run : pnpm module build
4645
Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ jobs:
1818 steps :
1919 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020
21- - name : Setup Node.js and pnpm
22- uses : shop/ setup-javascript-action@main
21+ - name : Setup Node.js, pnpm, and install dependencies
22+ uses : ./.github/actions/ setup
2323 with :
2424 node-version-file : platforms/react-native/package.json
2525 cache-dependency-path : platforms/react-native/pnpm-lock.yaml
26+ package-json-file : platforms/react-native/package.json
27+ working-directory : platforms/react-native
2628
2729 - name : Install JDK
2830 id : setup-java
3941 restore-keys : |
4042 ${{ runner.os }}-turbo-
4143
42- - name : Install dependencies
43- run : pnpm install --frozen-lockfile
44-
4544 - name : Run Android tests
4645 timeout-minutes : 20
4746 env :
Original file line number Diff line number Diff line change @@ -28,11 +28,13 @@ jobs:
2828 CURRENT_SIMULATOR_UUID=$(xcrun simctl create TestDevice "iPhone 16 Pro")
2929 echo "CURRENT_SIMULATOR_UUID=$CURRENT_SIMULATOR_UUID" >> "$GITHUB_ENV"
3030
31- - name : Setup Node.js and pnpm
32- uses : shop/ setup-javascript-action@main
31+ - name : Setup Node.js, pnpm, and install dependencies
32+ uses : ./.github/actions/ setup
3333 with :
3434 node-version-file : platforms/react-native/package.json
3535 cache-dependency-path : platforms/react-native/pnpm-lock.yaml
36+ package-json-file : platforms/react-native/package.json
37+ working-directory : platforms/react-native
3638
3739 - name : Cache turbo build setup
3840 uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
4244 restore-keys : |
4345 ${{ runner.os }}-turbo-
4446
45- - name : Install dependencies
46- run : pnpm install --frozen-lockfile
47-
4847 - name : Setup Ruby
4948 uses : ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
5049 with :
Original file line number Diff line number Diff line change @@ -18,14 +18,13 @@ jobs:
1818 steps :
1919 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020
21- - name : Setup Node.js and pnpm
22- uses : shop/ setup-javascript-action@main
21+ - name : Setup Node.js, pnpm, and install dependencies
22+ uses : ./.github/actions/ setup
2323 with :
2424 node-version-file : platforms/react-native/package.json
2525 cache-dependency-path : platforms/react-native/pnpm-lock.yaml
26-
27- - name : Install dependencies
28- run : pnpm install --frozen-lockfile
26+ package-json-file : platforms/react-native/package.json
27+ working-directory : platforms/react-native
2928
3029 - name : Run tests with coverage
3130 run : pnpm test --coverage --testPathPatterns="modules/@shopify/checkout-sheet-kit/tests" --coverageReporters=json-summary
You can’t perform that action at this time.
0 commit comments