Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from zmillman/check-cache-npm-install
Browse files Browse the repository at this point in the history
Enable npm install caching
  • Loading branch information
zmillman authored May 3, 2024
2 parents c1eb37e + b8f5288 commit c99f355
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,30 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: echo "node_version=$(cat .github/nodejs.version)" >> $GITHUB_ENV

- name: "use node ${{ env.node_version }}"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "${{ env.node_version }}"

- name: Cache node_modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-nodemodules
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm install --frozen-lockfile
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm clean-install

- name: Lint check
run: npm run lint

- name: Format check
run: npm run prettier

- name: Unit & Integration tests
run: npm run test
1 change: 1 addition & 0 deletions .github/workflows/nodejs.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22

0 comments on commit c99f355

Please sign in to comment.