From 4bb996d54993a4b51977a5bd10170e1d3f5053ea Mon Sep 17 00:00:00 2001 From: weareoutman Date: Thu, 14 Jan 2021 22:35:39 +0800 Subject: [PATCH] chore: cache in CI --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfdce60..496396e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,14 +24,27 @@ jobs: uses: zcong1993/setup-timezone@master with: timezone: Asia/Shanghai + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + + - uses: actions/cache@v2 + with: + path: | + ~/.npm + node_modules + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - run: npm ci - run: npm run build - run: npm test + - name: Coveralls Parallel uses: coverallsapp/github-action@master with: