From 17a56b3482ad6034202f1594604d49b798704f19 Mon Sep 17 00:00:00 2001 From: Oscar Dominguez Date: Sun, 18 Jul 2021 12:59:36 +0200 Subject: [PATCH] ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows --- .github/workflows/release.yml | 1 + .github/workflows/test.yml | 1 + .github/workflows/update-prettier.yml | 1 + .github/workflows/update.yml | 2 ++ 4 files changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0ed73a7..5f65da95 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,7 @@ jobs: - uses: actions/setup-node@v2 with: node-version: "12.x" + cache: npm - run: npm ci - run: npm run build - run: npx semantic-release diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39ae3510..0e8df7d8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,7 @@ jobs: uses: actions/setup-node@v2 with: version: ${{ matrix.node_version }} + cache: npm - run: npm ci - run: npx jest --coverage diff --git a/.github/workflows/update-prettier.yml b/.github/workflows/update-prettier.yml index 0485c870..b85e78c7 100644 --- a/.github/workflows/update-prettier.yml +++ b/.github/workflows/update-prettier.yml @@ -11,6 +11,7 @@ jobs: - uses: actions/setup-node@v2 with: version: 12 + cache: npm - run: npm ci - run: "npm run lint:fix" - uses: gr2m/create-or-update-pull-request-action@v1.x diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index caf03ffb..075b75ff 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -20,6 +20,8 @@ jobs: # make sure that other actions get triggered when using `git push` in gr2m/create-or-update-pull-request-action token: ${{ secrets.OCTOKITBOT_PAT }} - uses: actions/setup-node@v2 + with: + cache: npm # try checking out routes-update branch. Ignore error if it does not exist - run: git checkout routes-update || true