Files
SCEditor/.github/workflows/node.js.yml

35 lines
766 B
YAML

name: Node.js CI
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
FORCE_COLOR: 1
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 15
- name: Get npm cache directory
id: npm-cache-dir
run: echo "::set-output name=dir::$(npm root)"
- uses: actions/cache@v2
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node15-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node15-
- run: npm -v
- if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
- run: npm t