Skip to content

Merge pull request #290 from shgysk8zer0/dependabot/github_actions/ac… #578

Merge pull request #290 from shgysk8zer0/dependabot/github_actions/ac…

Merge pull request #290 from shgysk8zer0/dependabot/github_actions/ac… #578

Workflow file for this run

---
name: Node CI
on:
push:
branches:
- master
- release/*
pull_request:
branches:
- master
- release/*
jobs:
npm-test:
name: NPM Install and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
submodules: true
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: npm
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Restore cache
uses: actions/cache@v3
# use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Run npm test
run: npm test --if-present