Skip to content

NPM Tests

NPM Tests #1

Workflow file for this run

name: Test YepCode Run
on:
workflow_call:
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Cache npm
uses: actions/cache@v4
env:
cache-name: cache-npm
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-npm
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Setup npm
run: |
unset NPM_CONFIG_USER
npm ci
- name: Unit tests
run: "npm run test"
env:
YEPCODE_API_TOKEN: ${{ secrets.TEST_YEPCODE_API_TOKEN }}