From ccd784571e74faac8f8b4310325fe39a4dd4be0f Mon Sep 17 00:00:00 2001 From: Oscar Dominguez Date: Wed, 21 Jul 2021 06:05:37 +0200 Subject: [PATCH] ci(workflow): add cache to workflows using actions/setup-node (#279) --- .github/workflows/release.yml | 4 +++- .github/workflows/test.yml | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d21c4ce..f211732c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,9 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 - - uses: bahmutov/npm-install@v1 + with: + cache: npm + - run: npm ci - run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 338d163e..ba98f4d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,8 @@ jobs: uses: actions/setup-node@v2 with: node-version: "${{ matrix.node-version }}" - - uses: bahmutov/npm-install@v1 + cache: npm + - run: npm ci - run: "npm run test:ci" test: runs-on: ubuntu-latest @@ -40,5 +41,6 @@ jobs: uses: actions/setup-node@v2 with: node-version: "${{ matrix.node-version }}" - - uses: bahmutov/npm-install@v1 + cache: npm + - run: npm ci - run: npm run lint