chore: update workflows to use yarn cache

This commit is contained in:
jorenbroekema 2020-11-09 14:06:53 +01:00
parent cfbcccb5c5
commit b37cc349d4
4 changed files with 32 additions and 32 deletions

View file

@ -24,20 +24,20 @@ jobs:
node-version: 14.x node-version: 14.x
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- name: Get npm cache directory - name: Get yarn cache directory
id: npm-cache-dir id: yarn-cache-dir
run: | run: |
echo "::set-output name=dir::$(npm config get cache)" echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2 - uses: actions/cache@v2
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`) id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with: with:
path: ${{ steps.npm-cache-dir.outputs.dir }} path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-npm- ${{ runner.os }}-yarn-
- name: Install Dependencies - name: Install Dependencies
run: run: yarn --frozen-lockfile
- name: Create Release Pull Request or Publish to npm - name: Create Release Pull Request or Publish to npm
id: changesets id: changesets

View file

@ -14,17 +14,17 @@ jobs:
with: with:
node-version: 14.x node-version: 14.x
- name: Get npm cache directory - name: Get yarn cache directory
id: npm-cache-dir id: yarn-cache-dir
run: | run: |
echo "::set-output name=dir::$(npm config get cache)" echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2 - uses: actions/cache@v2
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`) id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with: with:
path: ${{ steps.npm-cache-dir.outputs.dir }} path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-npm- ${{ runner.os }}-yarn-
- name: Install Dependencies - name: Install Dependencies
run: yarn --frozen-lockfile run: yarn --frozen-lockfile
@ -46,17 +46,17 @@ jobs:
with: with:
node-version: 14.x node-version: 14.x
- name: Get npm cache directory - name: Get yarn cache directory
id: npm-cache-dir id: yarn-cache-dir
run: | run: |
echo "::set-output name=dir::$(npm config get cache)" echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2 - uses: actions/cache@v2
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`) id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with: with:
path: ${{ steps.npm-cache-dir.outputs.dir }} path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-npm- ${{ runner.os }}-yarn-
- name: Install Dependencies - name: Install Dependencies
run: yarn --frozen-lockfile run: yarn --frozen-lockfile
@ -80,17 +80,17 @@ jobs:
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Get npm cache directory - name: Get yarn cache directory
id: npm-cache-dir id: yarn-cache-dir
run: | run: |
echo "::set-output name=dir::$(npm config get cache)" echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2 - uses: actions/cache@v2
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`) id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with: with:
path: ${{ steps.npm-cache-dir.outputs.dir }} path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-npm- ${{ runner.os }}-yarn-
- name: Install Dependencies - name: Install Dependencies
run: yarn --frozen-lockfile run: yarn --frozen-lockfile

View file

@ -49,7 +49,8 @@
"ora": "^3.4.0", "ora": "^3.4.0",
"parse5": "^5.1.1", "parse5": "^5.1.1",
"read-package-tree": "5.3.1", "read-package-tree": "5.3.1",
"semver": "^7.1.3" "semver": "^7.1.3",
"typescript": "3.9.7"
}, },
"devDependencies": { "devDependencies": {
"mermaid": "^8.2.6", "mermaid": "^8.2.6",

View file

@ -12,8 +12,7 @@
"alwaysStrict": true, "alwaysStrict": true,
"types": ["node", "mocha", "sinon"], "types": ["node", "mocha", "sinon"],
"esModuleInterop": true, "esModuleInterop": true,
"suppressImplicitAnyIndexErrors": true, "suppressImplicitAnyIndexErrors": true
"skipLibCheck": true
}, },
"include": ["packages/**/*.js"], "include": ["packages/**/*.js"],
"exclude": [ "exclude": [