Skip to content

Commit

Permalink
Merge f1bcbb6 into 1925471
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Jan 22, 2021
2 parents 1925471 + f1bcbb6 commit 748edff
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,41 @@
name: Lint

on:
push:
branches:
- master
- "!dependabot/**"
pull_request:
branches:
- "**"

env:
NODE: 14

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE }}

- name: Set up npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
${{ runner.os }}-node-v${{ env.NODE }}-
- name: Install npm dependencies
run: npm ci

- name: Run lint
run: npm run lint
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Expand Up @@ -32,12 +32,21 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
${{ runner.os }}-node-v${{ matrix.node }}-
- name: Install npm dependencies
run: npm ci

- name: Run lint
run: npm run lint

- name: Run tests
run: npm run mocha
if: "!(startsWith(matrix.os, 'ubuntu') && matrix.node == env.NODE_COV)"
Expand Down

0 comments on commit 748edff

Please sign in to comment.