Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
|
d6b1f0d21d | ||
|
3b49e487b6 | ||
|
fa5499b9fe | ||
|
bddf54e9fe |
5 changed files with 76 additions and 57 deletions
66
.github/workflows/ci.yml
vendored
Normal file
66
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
tags-ignore:
|
||||||
|
- '*.*'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [10.x, 12.x, 13.x, 14.x]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: Run tests
|
||||||
|
run: npm run test
|
||||||
|
- name: Coverage
|
||||||
|
run: |
|
||||||
|
npm install -g codecov
|
||||||
|
npm run report-coverage
|
||||||
|
gh-pages:
|
||||||
|
needs: ['test']
|
||||||
|
if: success() && github.event_name == 'push' && github.repository_owner == 'retailcrm' && github.ref == 'refs/heads/master'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 10.x
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: Generate doc
|
||||||
|
run: npm run doc
|
||||||
|
- name: Deploy doc
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./out
|
||||||
|
deploy:
|
||||||
|
needs: ['test']
|
||||||
|
if: success() && github.event_name == 'push' && github.repository_owner == 'retailcrm' && github.ref == 'refs/heads/master'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 10.x
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
- name: Publish
|
||||||
|
uses: JS-DevTools/npm-publish@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.NPM_TOKEN }}
|
46
.travis.yml
46
.travis.yml
|
@ -1,46 +0,0 @@
|
||||||
os: linux
|
|
||||||
language: node_js
|
|
||||||
|
|
||||||
if: tag IS blank
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- test
|
|
||||||
- gh pages
|
|
||||||
- npm deploy
|
|
||||||
|
|
||||||
script: npm run test
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
- node_js: 10
|
|
||||||
- node_js: 12
|
|
||||||
- node_js: 13
|
|
||||||
- node_js: 14
|
|
||||||
after_success:
|
|
||||||
- npm install -g codecov
|
|
||||||
- npm run report-coverage
|
|
||||||
- stage: gh pages
|
|
||||||
node_js: 10
|
|
||||||
script: skip
|
|
||||||
before_deploy: npm run doc
|
|
||||||
deploy:
|
|
||||||
provider: pages
|
|
||||||
skip-cleanup: true
|
|
||||||
github-token: $GITHUB_TOKEN
|
|
||||||
keep-history: true
|
|
||||||
local-dir: out
|
|
||||||
on:
|
|
||||||
branch: master
|
|
||||||
if: branch = master AND type = push AND fork = false
|
|
||||||
- stage: npm deploy
|
|
||||||
node_js: 10
|
|
||||||
script: skip
|
|
||||||
before_deploy: npm run build
|
|
||||||
deploy:
|
|
||||||
provider: npm
|
|
||||||
email: $NPM_EMAIL
|
|
||||||
api_key: $NPM_API_KEY
|
|
||||||
skip-cleanup: true
|
|
||||||
on:
|
|
||||||
branch: master
|
|
||||||
if: branch = master AND type = push AND fork = false
|
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2018 retailCRM
|
Copyright (c) 2018-2020 RetailDriver LLC
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
13
README.md
13
README.md
|
@ -1,11 +1,10 @@
|
||||||
[](https://travis-ci.org/retailcrm/mg-bot-api-client-js)
|
[](https://github.com/retailcrm/mg-bot-api-client-js/actions)
|
||||||
[](https://github.com/retailcrm/mg-bot-api-client-js/releases)
|
[](https://codecov.io/gh/retailcrm/mg-bot-api-client-js)
|
||||||
[](https://www.npmjs.com/package/mg-api-client)
|
[](https://npmjs.com/package/mg-api-client)
|
||||||
|
[](https://www.npmjs.com/package/mg-api-client)
|
||||||
|
[](https://retailcrm.github.io/mg-bot-api-client-js/)
|
||||||
|
|
||||||
|
# Message Gateway Bot API JavaScript client
|
||||||
# retailCRM Message Gateway Bot API JS client
|
|
||||||
|
|
||||||
This is js retailCRM bot API client.
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "mg-api-client",
|
"name": "mg-api-client",
|
||||||
"description": "JS client for retailCRM Bot API",
|
"description": "JavaScript client for Message Gateway Bot API",
|
||||||
"tags": [
|
"tags": [
|
||||||
"API",
|
"API",
|
||||||
"retailCRM",
|
"RetailCRM",
|
||||||
"Bot",
|
"Bot",
|
||||||
"Chat"
|
"Chat"
|
||||||
],
|
],
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
"test": "./node_modules/.bin/nyc ./node_modules/.bin/_mocha --require @babel/register ./tests/.",
|
"test": "./node_modules/.bin/nyc ./node_modules/.bin/_mocha --require @babel/register ./tests/.",
|
||||||
"report-coverage": "./node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && codecov"
|
"report-coverage": "./node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && codecov"
|
||||||
},
|
},
|
||||||
"author": "retailCRM",
|
"author": "RetailCRM",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue