Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Use cache for jest (#10124)
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros authored Mar 3, 2023
1 parent ecebac6 commit 8d9fdc3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ jobs:
env:
JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }}

- name: Jest Cache
uses: actions/cache@v3
with:
path: /tmp/jest_cache
key: ${{ hashFiles('**/yarn.lock') }}

- name: Get number of CPU cores
id: cpu-cores
uses: SimenB/github-actions-cpu-cores@v1
Expand All @@ -54,7 +60,8 @@ jobs:
yarn ${{ inputs.disable_coverage != 'true' && 'coverage' || 'test' }} \
--ci \
--reporters github-actions ${{ steps.metrics.outputs.extra-reporter }} \
--max-workers ${{ steps.cpu-cores.outputs.count }}
--max-workers ${{ steps.cpu-cores.outputs.count }} \
--cacheDirectory /tmp/jest_cache
- name: Upload Artifact
if: inputs.disable_coverage != 'true'
Expand Down

0 comments on commit 8d9fdc3

Please sign in to comment.