2020-07-12 01:55:31 +08:00
|
|
|
name: Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "*"
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Node
|
2021-10-13 23:09:13 +08:00
|
|
|
uses: actions/setup-node@v1
|
2020-07-12 01:55:31 +08:00
|
|
|
with:
|
2022-09-24 16:20:54 +08:00
|
|
|
node-version: "16.x"
|
2021-10-13 23:09:13 +08:00
|
|
|
|
2020-07-12 01:55:31 +08:00
|
|
|
- name: Install & Test
|
|
|
|
run: |
|
2022-09-24 16:37:24 +08:00
|
|
|
npm ci
|
2020-07-12 01:55:31 +08:00
|
|
|
npm run test
|
2020-07-23 01:56:10 +08:00
|
|
|
|
2022-09-06 15:09:45 +08:00
|
|
|
- name: Run Prettier
|
|
|
|
run: |
|
2022-09-16 18:55:35 +08:00
|
|
|
npm run format:check
|
2022-09-06 15:09:45 +08:00
|
|
|
|
2020-07-23 01:56:10 +08:00
|
|
|
- name: Code Coverage
|
|
|
|
uses: codecov/codecov-action@v1
|