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
registry-url: 'https://registry.npmjs.org'
- name: Get npm cache directory
id: npm-cache-dir
- name: Get yarn cache directory
id: yarn-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "::set-output name=dir::$(yarn cache dir)"
- 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:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-npm-
${{ runner.os }}-yarn-
- name: Install Dependencies
run:
run: yarn --frozen-lockfile
- name: Create Release Pull Request or Publish to npm
id: changesets

View file

@ -14,17 +14,17 @@ jobs:
with:
node-version: 14.x
- name: Get npm cache directory
id: npm-cache-dir
- name: Get yarn cache directory
id: yarn-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "::set-output name=dir::$(yarn cache dir)"
- 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:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-npm-
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn --frozen-lockfile
@ -46,17 +46,17 @@ jobs:
with:
node-version: 14.x
- name: Get npm cache directory
id: npm-cache-dir
- name: Get yarn cache directory
id: yarn-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "::set-output name=dir::$(yarn cache dir)"
- 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:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-npm-
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn --frozen-lockfile
@ -80,17 +80,17 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Get npm cache directory
id: npm-cache-dir
- name: Get yarn cache directory
id: yarn-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "::set-output name=dir::$(yarn cache dir)"
- 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:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-npm-
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn --frozen-lockfile

View file

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

View file

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