synclounge/.github/workflows/test.yml

44 lines
951 B
YAML
Raw Normal View History

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