8965 API - User API #4803
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: JS Unit Test | |
on: | |
push: | |
branches: | |
- master | |
- rel-* | |
pull_request: | |
branches: | |
- master | |
- rel-* | |
permissions: | |
contents: read | |
jobs: | |
js_unit_test: | |
runs-on: ubuntu-24.04 | |
name: JS Unit Test | |
strategy: | |
matrix: | |
# Single-element matrix provides named variable and job title | |
node-version: ['22'] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v5 | |
- name: Install npm package | |
uses: actions/setup-node@v5 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get NPM Cache Directory | |
id: npm-cache-dir | |
run: | | |
{ | |
printf 'dir=' | |
npm config get cache | |
} >> "$GITHUB_OUTPUT" | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-${{ matrix.node-version }}- | |
${{ runner.os }}-node- | |
- name: NPM CI | |
run: npm ci | |
- name: Run Unit Tests | |
run: npm run test:js |