Skip to content

Commit

Permalink
workaround for yarn caches on subprojects: from actions/setup-node#48…
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Martins authored and Manuel Martins committed Feb 27, 2023
1 parent 9b37073 commit 378ae69
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [19.x]
node-version: [ 19.x ]

steps:
- uses: actions/checkout@v3
Expand All @@ -75,7 +75,18 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
working-directory: ja
- name: Restore yarn cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- run: yarn install --frozen-lockfile
working-directory: js
- run: yarn run lint
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/NPM_PYPI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,18 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
working-directory: ja
- name: Restore yarn cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- run: yarn install --frozen-lockfile
working-directory: js
- run: yarn run build:prod
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/RELEASE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,18 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
working-directory: ja
- name: Restore yarn cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- run: yarn install --frozen-lockfile
working-directory: js
- run: yarn run docs
Expand Down

0 comments on commit 378ae69

Please sign in to comment.