Skip to content

Commit

Permalink
chore(ci): e2e sharded tests dont all run npm i
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed Dec 2, 2023
1 parent e6c930e commit fa588f0
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,17 @@ jobs:
restore-keys: |
test-build-${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'public', 'src/**', '*.js', '*.ts') }}
- name: Cache node_modules
uses: actions/[email protected]
id: test-npm-cache
with:
path: node_modules
key: test-npm-${{ runner.os }}-${{ github.sha }}-${{ hashFiles('package.json', 'package-lock.json', 'public', 'src/**', 'patches/**', '*.js', '*.ts') }}
restore-keys: |
test-npm-${{ runner.os }}-${{ github.sha }}-${{ hashFiles('package.json', 'package-lock.json', 'public', 'src/**', 'patches/**', '*.js', '*.ts') }}
- name: Install dependencies
if: steps.test-npm-cache.outputs.cache-hit != 'true'
run: npm ci --prefer-offline --no-audit --progress=false

# This is required to ensure that our code is instrumented with coverage details
Expand Down Expand Up @@ -58,14 +68,19 @@ jobs:
restore-keys: |
test-build-${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json', 'public', 'src/**', '*.js', '*.ts') }}
# We don't want to re-install dependencies for every sharded run
- name: Cache node_modules
uses: actions/[email protected]
id: test-npm-cache
with:
path: node_modules
key: test-npm-${{ runner.os }}-${{ github.sha }}-${{ hashFiles('package.json', 'package-lock.json', 'public', 'src/**', 'patches/**', '*.js', '*.ts') }}
restore-keys: |
test-npm-${{ runner.os }}-${{ github.sha }}-${{ hashFiles('package.json', 'package-lock.json', 'public', 'src/**', 'patches/**', '*.js', '*.ts') }}
- name: Install dependencies
if: steps.test-npm-cache.outputs.cache-hit != 'true'
run: npm ci --prefer-offline --no-audit --progress=false

# This is required to ensure that our code is instrumented with coverage details
- name: Run test build
if: steps.test-build-cache.outputs.cache-hit != 'true'
run: npm run test:build

# Cache playwright binaries
- uses: actions/cache@v3
id: playwright-cache
Expand Down

0 comments on commit fa588f0

Please sign in to comment.