Skip to content

Commit 5778148

Browse files
authored
Merge pull request #5 from corycaywood/ci/yarn-caching
ci: Add caching for Yarn and install via --frozen-lockfile
2 parents 47b6669 + 986eaa5 commit 5778148

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.circleci/config.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ jobs: # a collection of steps
77
steps:
88
- checkout
99
- restore_cache:
10-
key: dependency-cache-{{ checksum "package-lock.json" }}
10+
name: Restore Yarn Package Cache
11+
key: yarn-packages-{{ checksum "yarn.lock" }}
1112
- run:
12-
name: yarn install
13-
command: yarn install
13+
name: Install dependencies w/ Yarn
14+
command: yarn install --frozen-lockfile
1415
- save_cache:
15-
key: dependency-cache-{{ checksum "package-lock.json" }}
16+
name: Save Yarn Package Cache
17+
key: yarn-packages-{{ checksum "yarn.lock" }}
1618
paths:
17-
- ./node_modules
19+
- ~/.cache/yarn
1820
- run: #run lint and check for formatting
1921
name: check
20-
command: yarn sdk check
22+
command: yarn sdk lint
2123
- run: #compile the code
2224
name: compile
2325
command: yarn sdk compile

js-miniapp-sdk/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
"typescript": "^3.8.3"
2525
},
2626
"scripts": {
27-
"check": "gts check",
27+
"lint": "gts check",
2828
"clean": "gts clean",
2929
"compile": "tsc -p .",
30-
"prebuild": "npm run clean && npm run check",
31-
"build": "npm run clean && npm run check && tsc -p . && npm run test",
30+
"prebuild": "npm run clean && npm run lint",
31+
"build": "npm run clean && npm run lint && tsc -p . && npm run test",
3232
"fix": "gts fix",
3333
"test": "mocha -r ts-node/register tests/**/*.spec.ts --reporter mocha-junit-reporter --reporter-options mochaFile=./test-results/mocha/results.xml",
3434
"coverage": "nyc npm test",

0 commit comments

Comments
 (0)