2021-02-09 11:13:31 +01:00
|
|
|
name: 'CI'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '**'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Node.js
|
2021-08-03 14:16:02 +02:00
|
|
|
uses: actions/setup-node@v2
|
2021-02-09 11:13:31 +01:00
|
|
|
with:
|
2021-08-03 14:16:02 +02:00
|
|
|
node-version: '16'
|
2021-02-09 11:13:31 +01:00
|
|
|
|
|
|
|
- name: Cache node modules
|
2021-08-03 14:16:02 +02:00
|
|
|
uses: actions/cache@v2
|
|
|
|
env:
|
|
|
|
cache-name: cache-node-modules
|
2021-02-09 11:13:31 +01:00
|
|
|
with:
|
|
|
|
path: ~/.npm
|
2021-08-03 14:16:02 +02:00
|
|
|
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: ${{ runner.os }}-lint-${{ env.cache-name }}-
|
2021-02-09 11:13:31 +01:00
|
|
|
- run: npm ci
|
|
|
|
- run: npm run lint
|