synclounge/.github/workflows/test.yml

46 lines
943 B
YAML

name: test
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [12, 14, 15]
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.4
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
id: cache
uses: actions/cache@v2.1.3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache hit
run: echo ${{ steps.cache.outputs.cache-hit }}
- name: Install dependencies
run: npm ci
env:
SKIP_BUILD: true
- name: Lint
run: npm run lint -- --no-fix
- name: Build
run: npm run build