ci: add test workflow (#16)
This commit is contained in:
Родитель
cbb86492fe
Коммит
e86491c828
|
@ -0,0 +1,28 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag: v4.2.2
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # tag: v4.0.4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: Test
|
||||
run: |
|
||||
yarn --frozen-lockfile
|
||||
yarn build
|
||||
yarn prettier:check
|
||||
yarn test
|
|
@ -17,7 +17,8 @@
|
|||
"start": "node dist/index.js",
|
||||
"prepare": "husky install",
|
||||
"prettier:check": "prettier --check \"src/**/*.ts\"",
|
||||
"prettier:write": "prettier --write \"src/**/*.ts\""
|
||||
"prettier:write": "prettier --write \"src/**/*.ts\"",
|
||||
"test": "jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.6",
|
||||
|
|
Загрузка…
Ссылка в новой задаче