chore: cache node_modules

This commit is contained in:
Dogtiti 2024-10-11 15:41:46 +08:00
parent be98aa2078
commit bd43af3a8d
1 changed files with 15 additions and 1 deletions

View File

@ -1,6 +1,12 @@
name: Run Tests name: Run Tests
on: [push, pull_request] on:
push:
branches:
- main
tags:
- "!*"
pull_request:
jobs: jobs:
test: test:
@ -16,6 +22,14 @@ jobs:
node-version: 18 node-version: 18
cache: "yarn" cache: "yarn"
- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Install dependencies - name: Install dependencies
run: yarn install run: yarn install