mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 04:48:50 +03:00
Use cache for jest (#10124)
This commit is contained in:
parent
ecebac6ea1
commit
8d9fdc3b41
1 changed files with 8 additions and 1 deletions
9
.github/workflows/tests.yml
vendored
9
.github/workflows/tests.yml
vendored
|
@ -39,6 +39,12 @@ jobs:
|
||||||
env:
|
env:
|
||||||
JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }}
|
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
|
- name: Get number of CPU cores
|
||||||
id: cpu-cores
|
id: cpu-cores
|
||||||
uses: SimenB/github-actions-cpu-cores@v1
|
uses: SimenB/github-actions-cpu-cores@v1
|
||||||
|
@ -54,7 +60,8 @@ jobs:
|
||||||
yarn ${{ inputs.disable_coverage != 'true' && 'coverage' || 'test' }} \
|
yarn ${{ inputs.disable_coverage != 'true' && 'coverage' || 'test' }} \
|
||||||
--ci \
|
--ci \
|
||||||
--reporters github-actions ${{ steps.metrics.outputs.extra-reporter }} \
|
--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
|
- name: Upload Artifact
|
||||||
if: inputs.disable_coverage != 'true'
|
if: inputs.disable_coverage != 'true'
|
||||||
|
|
Loading…
Reference in a new issue