Skip to content

Merge pull request #38 from AegisJSProject/dependabot/npm_and_yarn/ae… #94

Merge pull request #38 from AegisJSProject/dependabot/npm_and_yarn/ae…

Merge pull request #38 from AegisJSProject/dependabot/npm_and_yarn/ae… #94

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@v4
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@v4
# 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