From aa7c49538daf556ce9d1fdb53cd1282c4f0b6078 Mon Sep 17 00:00:00 2001 From: Oscar Dominguez Date: Tue, 12 Oct 2021 20:02:03 +0200 Subject: [PATCH] ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows --- .github/workflows/npm-eslint-plugin-meteor.yml | 10 +++++----- .github/workflows/npm-meteor-babel.yml | 9 +++++---- .github/workflows/npm-meteor-promise.yml | 9 +++++---- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/npm-eslint-plugin-meteor.yml b/.github/workflows/npm-eslint-plugin-meteor.yml index 6a57680a01..cb283e3c54 100644 --- a/.github/workflows/npm-eslint-plugin-meteor.yml +++ b/.github/workflows/npm-eslint-plugin-meteor.yml @@ -2,10 +2,10 @@ name: NPM eslint-plugin-meteor on: push: paths: - - 'npm-packages/eslint-plugin-meteor/**' + - "npm-packages/eslint-plugin-meteor/**" pull_request: paths: - - 'npm-packages/eslint-plugin-meteor/**' + - "npm-packages/eslint-plugin-meteor/**" jobs: test: runs-on: ubuntu-latest @@ -14,13 +14,13 @@ jobs: working-directory: npm-packages/eslint-plugin-meteor strategy: matrix: - node-version: [ 12.x, 14.x ] + node-version: [12.x, 14.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + cache: npm - run: npm ci - run: npm test - diff --git a/.github/workflows/npm-meteor-babel.yml b/.github/workflows/npm-meteor-babel.yml index dfd1b60125..6a20fb61b2 100644 --- a/.github/workflows/npm-meteor-babel.yml +++ b/.github/workflows/npm-meteor-babel.yml @@ -2,10 +2,10 @@ name: NPM meteor-babel on: push: paths: - - 'npm-packages/meteor-babel/**' + - "npm-packages/meteor-babel/**" pull_request: paths: - - 'npm-packages/meteor-babel/**' + - "npm-packages/meteor-babel/**" jobs: test: runs-on: ubuntu-latest @@ -14,12 +14,13 @@ jobs: working-directory: npm-packages/meteor-babel strategy: matrix: - node-version: [ 12.x, 14.x ] + node-version: [12.x, 14.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + cache: npm - run: npm ci - run: npm run test diff --git a/.github/workflows/npm-meteor-promise.yml b/.github/workflows/npm-meteor-promise.yml index 1e22e19362..247a5a76c2 100644 --- a/.github/workflows/npm-meteor-promise.yml +++ b/.github/workflows/npm-meteor-promise.yml @@ -2,10 +2,10 @@ name: NPM meteor-promise on: push: paths: - - 'npm-packages/meteor-promise/**' + - "npm-packages/meteor-promise/**" pull_request: paths: - - 'npm-packages/meteor-promise/**' + - "npm-packages/meteor-promise/**" jobs: test: runs-on: ubuntu-latest @@ -14,12 +14,13 @@ jobs: working-directory: npm-packages/meteor-promise strategy: matrix: - node-version: [ 12.x, 14.x ] + node-version: [12.x, 14.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + cache: npm - run: npm ci - run: npm run test