Skip to content

Merge pull request #161 from aashish-dhiman/patch-1 #131

Merge pull request #161 from aashish-dhiman/patch-1

Merge pull request #161 from aashish-dhiman/patch-1 #131

Workflow file for this run

name: CI
on: [push, pull_request]
env:
NODE_VERSION_USED_FOR_DEVELOPMENT: 14
jobs:
lint:
name: Lint source files
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
- name: Install Dependencies
run: npm ci
- name: Lint ESLint
run: npm run lint
- name: Type Check
run: npm run check
test:
name: Run tests on Node v${{ matrix.node_version_to_setup }}
runs-on: ubuntu-latest
strategy:
matrix:
node_version_to_setup: [12, 14, 16]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Node.js v${{ matrix.node_version_to_setup }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version_to_setup }}
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: npm run testonly