2020-07-12 01:55:31 +08:00
|
|
|
name: Test
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-07-19 15:51:54 +08:00
|
|
|
- master
|
2020-07-12 01:55:31 +08:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
2023-07-02 15:06:04 +08:00
|
|
|
permissions: read-all
|
|
|
|
|
2020-07-12 01:55:31 +08:00
|
|
|
jobs:
|
|
|
|
build:
|
2022-10-02 17:05:13 +08:00
|
|
|
name: Perform tests
|
2020-07-12 01:55:31 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-10-02 16:38:07 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-06-14 15:08:40 +08:00
|
|
|
node-version: [18.x]
|
2020-07-12 01:55:31 +08:00
|
|
|
|
|
|
|
steps:
|
2023-07-21 17:55:56 +08:00
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
2020-07-12 01:55:31 +08:00
|
|
|
|
|
|
|
- name: Setup Node
|
2023-07-23 04:33:55 +08:00
|
|
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
|
2020-07-12 01:55:31 +08:00
|
|
|
with:
|
2022-10-02 16:38:07 +08:00
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
cache: npm
|
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
|
|
|
|
2023-07-03 14:54:19 +08:00
|
|
|
- name: Run ESLint
|
|
|
|
run: |
|
2023-07-05 06:08:59 +08:00
|
|
|
npm run lint
|
2023-07-03 14:54:19 +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
|
2023-07-21 17:55:56 +08:00
|
|
|
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
|