Skip to content

Commit a6d0d9c

Browse files
Simplify github action config
1 parent 4eeb199 commit a6d0d9c

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,25 @@ jobs:
1414
- uses: actions/setup-node@v1
1515
with:
1616
node-version: '12.x'
17-
- name: npm install, build, and test
18-
run: npm ci
19-
- name: build
20-
run: npm run prepare
17+
- name: Cache node modules
18+
uses: actions/cache@v1
2119
env:
22-
CI: true
20+
cache-name: cache-node-modules
21+
with:
22+
path: ~/.npm
23+
# This uses the same name as the build-action so we can share the caches.
24+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
25+
restore-keys: |
26+
${{ runner.os }}-build-${{ env.cache-name }}-
27+
${{ runner.os }}-build-
28+
${{ runner.os }}-
29+
- run: npm ci
2330
- name: build
24-
run: npm test
25-
env:
26-
CI: true
27-
- name: saucelabs
28-
run: npm run test:browser
31+
run: npm run prepare
32+
- name: test
33+
run: |
34+
npm run lint
35+
npm run test:browsers
2936
env:
3037
CI: true
3138
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}

0 commit comments

Comments
 (0)