|
1 |
| -name: 'Setup E2E Test Environment' |
| 1 | + name: 'Setup E2E Test Environment' |
2 | 2 | description: 'Sets up the environment for running E2E tests'
|
3 | 3 |
|
4 | 4 | inputs:
|
@@ -81,6 +81,10 @@ inputs:
|
81 | 81 | description: 'Target for which the keystore is being configured (e.g., qa, flask, main)'
|
82 | 82 | required: false
|
83 | 83 | default: 'qa'
|
| 84 | + skip-yarn-install: |
| 85 | + description: 'Whether to skip yarn install (assumes node_modules already available)' |
| 86 | + required: false |
| 87 | + default: 'false' |
84 | 88 |
|
85 | 89 | runs:
|
86 | 90 | using: 'composite'
|
@@ -189,18 +193,26 @@ runs:
|
189 | 193 | run: corepack enable && corepack prepare yarn@${{ inputs.yarn-version }} --activate
|
190 | 194 | shell: bash
|
191 | 195 |
|
192 |
| - - name: Restore Yarn cache |
| 196 | + - name: Restore Yarn cache (cross-workflow) |
| 197 | + if: ${{ inputs.skip-yarn-install == 'false' }} |
193 | 198 | uses: actions/cache@v4
|
194 | 199 | with:
|
195 | 200 | path: |
|
196 | 201 | node_modules
|
197 |
| - key: ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} |
| 202 | + ~/.yarn/cache |
| 203 | + ~/.cache/yarn |
| 204 | + key: ${{ inputs.cache-prefix }}-yarn-v2-${{ runner.os }}-${{ hashFiles('yarn.lock', 'package.json') }} |
198 | 205 | restore-keys: |
|
199 |
| - ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}- |
| 206 | + ${{ inputs.cache-prefix }}-yarn-v2-${{ runner.os }}- |
| 207 | + ${{ inputs.cache-prefix }}-yarn-v1-${{ runner.os }}- |
200 | 208 |
|
201 | 209 | - name: Install JavaScript dependencies
|
| 210 | + if: ${{ inputs.skip-yarn-install == 'false' }} |
202 | 211 | id: yarn-install
|
203 |
| - run: yarn install --frozen-lockfile |
| 212 | + run: | |
| 213 | + echo "📦 Installing JavaScript dependencies..." |
| 214 | + yarn install --frozen-lockfile --prefer-offline |
| 215 | + echo "✅ JavaScript dependencies installed successfully" |
204 | 216 | shell: bash
|
205 | 217 | env:
|
206 | 218 | NODE_OPTIONS: --max-old-space-size=4096 # Increase memory limit for Node.js due to large dependencies
|
|
0 commit comments