mirror of
https://github.com/actions/cache.git
synced 2025-06-28 05:33:46 +00:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Nodoubtz <53144580+nodoubtz@users.noreply.github.com>
42 lines
903 B
YAML
42 lines
903 B
YAML
name: NodeJS with Grunt
|
|
|
|
on:
|
|
push:
|
|
branches: [ "Nodoubtz" ]
|
|
pull_request:
|
|
branches: [ "Nodoubtz" ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [18.x, 20.x, 22.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Restore node_modules cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-
|
|
|
|
- name: Build
|
|
run: |
|
|
npm install
|
|
grunt
|
|
|
|
- name: Save node_modules cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|