-
Notifications
You must be signed in to change notification settings - Fork 33
40 lines (32 loc) · 1.06 KB
/
ci.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
35
36
37
38
39
40
name: CI
on:
workflow_dispatch:
pull_request:
types: [opened, edited, synchronize, reopened]
push:
jobs:
format-lint-test:
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: 'Restore node_modules cache'
id: cache-npm
uses: actions/cache@v3
with:
path: node_modules
key: npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-${{ env.cache-name }}-
npm-
- name: 'Install npm dependencies'
if: steps.cache-npm.outputs.cache-hit != 'true'
run: HUSKY=0 npm ci
- name: 'Format'
run: npm run prettier:verify
- name: 'Lint'
run: npm run lint
- name: 'Unit test'
run: npm run test:coverage
- name: 'Upload code coverage to Codecov.io'
uses: codecov/codecov-action@v3