forked from nodejs/nodejs.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (27 loc) · 727 Bytes
/
test.yml
File metadata and controls
35 lines (27 loc) · 727 Bytes
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
35
name: Test
on:
pull_request:
push:
branches:
- main
jobs:
test-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/setup-node@v2.2.0
- uses: actions/cache@v2.1.6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Run linting
run: npm run lint
- name: Run test and coverage
run: npm run test-ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.5.2