Skip to content

Commit

Permalink
Add yarn cache to regular unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Simeon Widdis <[email protected]>
  • Loading branch information
Swiddis committed Oct 1, 2024
1 parent c11d813 commit 6a0a95c
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,23 @@ jobs:
with:
path: OpenSearch-Dashboards/plugins/dashboards-observability

- name: Get yarn cache dir
id: setup-yarn
shell: bash
run: |
cd ./OpenSearch-Dashboards
source $NVM_DIR/nvm.sh
nvm use
echo "yarn-cache-dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Yarn Cache
uses: actions/cache@v4
with:
path: ${{ steps.setup-yarn.outputs.yarn-cache-dir }}
key: ${{ runner.OS }}-yarn-${{ hashFiles('OpenSearch-Dashboards/**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-
- name: Plugin Bootstrap
uses: nick-fields/retry@v2
with:
Expand Down Expand Up @@ -118,6 +135,20 @@ jobs:
- run: node -v
- run: yarn -v

- name: Get yarn cache dir
id: setup-yarn
shell: bash
run: |
echo "yarn-cache-dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Yarn Cache
uses: actions/cache@v4
with:
path: ${{ steps.setup-yarn.outputs.yarn-cache-dir }}
key: ${{ runner.OS }}-yarn-${{ hashFiles('OpenSearch-Dashboards/**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-
- name: Checkout Dashboards Observability
uses: actions/checkout@v2
with:
Expand Down

0 comments on commit 6a0a95c

Please sign in to comment.