Skip to content

Commit 803d195

Browse files
authored
chore(test): action cache (#2634)
* yarn lock not json * dont dup key * prefer-offline
1 parent 1d3939c commit 803d195

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/test.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ jobs:
1717
- uses: actions/cache@v2
1818
with:
1919
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
20-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.json') }}
20+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2121
restore-keys: |
22-
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.json') }}
2322
${{ runner.os }}-yarn-
2423
${{ runner.os }}-
2524
- name: yarn test
2625
run: |
27-
yarn install --frozen-lockfile
26+
yarn install --frozen-lockfile --prefer-offline
2827
yarn lint
2928
yarn build
3029
yarn test:all

tools/run-typings-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ncp(pathToTestSrcFolder, pathToTestFolder, () => {
3535
.replace('{{TYPESCRIPT_VERSION}}', rootPackage.devDependencies.typescript)
3636
.replace(/\{\{ANGULAR_VERSION\}\}/g, rootPackage.dependencies['@angular/core']));
3737

38-
spawnIt('yarn', ['install'])
38+
spawnIt('yarn', ['install', '--prefer-offline'])
3939
.then(_ => spawnIt(`${pathToTestFolder}/node_modules/.bin/tsc`, ['--version']))
4040
.then(_ => new Promise((res, rej) => {
4141
child_process.exec(`${pathToTestFolder}/node_modules/.bin/tsc --diagnostics -p ${pathToTestFolder}/tsconfig-test.json`, (err, stdout, stderr) => {

0 commit comments

Comments
 (0)