-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 1.02 KB
/
pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
on: pull_request
name: Lint npm packages on pull request
jobs:
npmLint:
name: npm lint
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v2
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v2
env:
cache-name: ${{ github.event.repository.name }}
with:
# caching node_modules
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Run npm install
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm ci
- name: Run test
run: npm run test:ci
- name: Comment Test Coverage
uses: AthleticNet/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: coverage/workflows-creator/coverage-summary.json
title: Karma Test Coverage