Skip to content

Commit

Permalink
Update CI to cache node_modules per OS (withastro#2210)
Browse files Browse the repository at this point in the history
* chore(action): update CI to cache node_modules per OS

* fix(ci): run tests on lint fix

* Update ci.yml
  • Loading branch information
natemoo-re committed Dec 16, 2021
1 parent bb52818 commit c692847
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ jobs:
uses: actions/cache@v2
with:
path: "**/node_modules"
key: cache-node_modules-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
key: cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
restore-keys: |
cache-node_modules-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
cache-node_modules-${{ hashFiles('**/yarn.lock') }}-
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-
- name: Install NPM Dependencies
run: yarn install --prefer-offline --frozen-lockfile --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000
Expand Down Expand Up @@ -146,7 +146,10 @@ jobs:
uses: actions/cache@v2
with:
path: "**/node_modules"
key: cache-node_modules-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
key: cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
restore-keys: |
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-
- name: Install NPM Dependencies
run: yarn install --prefer-offline --frozen-lockfile --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000
Expand Down Expand Up @@ -191,7 +194,10 @@ jobs:
uses: actions/cache@v2
with:
path: "**/node_modules"
key: cache-node_modules-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
key: cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
restore-keys: |
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-
- name: Install NPM Dependencies
run: yarn install --prefer-offline --frozen-lockfile --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000
Expand Down Expand Up @@ -237,7 +243,10 @@ jobs:
uses: actions/cache@v2
with:
path: "**/node_modules"
key: cache-node_modules-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
key: cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
restore-keys: |
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
cache-node_modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-
- name: Install NPM Dependencies
run: yarn install --prefer-offline --frozen-lockfile --ignore-engines --registry https://registry.npmjs.org --network-timeout 300000
Expand All @@ -249,7 +258,7 @@ jobs:
uses: changesets/action@v1
with:
publish: yarn changeset publish
commit: 'chore: release'
commit: '[ci] release'
title: '[ci] release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit c692847

Please sign in to comment.