ci: try to configure build & test workflow

This commit is contained in:
Aleksandr Bukhalo 2020-03-28 10:54:05 +03:00
parent 67226c1117
commit d6104f9a40
2 changed files with 29 additions and 1 deletions

27
.github/workflows/build-test.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Build & Test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 13.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
env:
CI: true

View File

@ -31,7 +31,8 @@
"build": "rm -rf dist && tsc -p tsconfig.json",
"precommit": "lint-staged",
"prepublish:npm": "npm run build",
"publish:npm": "npm publish --access public"
"publish:npm": "npm publish --access public",
"test": ""
},
"dependencies": {
"telegraf": "3.36.0"