GitHub actions (#24)

* Добавил workflows для github actions
This commit is contained in:
Artem Vasilev 2022-06-22 19:45:45 +03:00 committed by GitHub
parent 7e43d21286
commit b5e77486ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 52 additions and 11 deletions

43
.github/workflows/test.yml vendored Executable file
View File

@ -0,0 +1,43 @@
name: CryptoPRO tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
buildAndTest:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [ lts/* ]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Clean install, build, test
run: |
npm ci
npm run build --if-present --openssl-legacy-provider
npm test
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: latest
- name: Clean install, lint
run: |
npm ci
npm run lint

View File

@ -1,3 +0,0 @@
language: node_js
node_js:
- lts/*

View File

@ -1,7 +1,8 @@
[![License][license-image]][license-url]
[![NPM version][npm-version-image]][npm-url] [![NPM version][npm-version-image]][npm-url]
[![NPM downloads][npm-downloads-image]][downloads-url] [![NPM downloads][npm-downloads-image]][downloads-url]
[![Build Status][travis-image]][travis-url] [![Build Status][actions-image]][actions-url]
[![Coverage Status][coveralls-image]][coveralls-url]
<a name="cryptopro"></a> <a name="cryptopro"></a>
# cryptoPro # cryptoPro
@ -200,11 +201,11 @@ npm unlink
# Лицензия # Лицензия
[MIT](/LICENSE) [MIT](/LICENSE)
[license-url]: /LICENSE
[license-image]: https://img.shields.io/github/license/webmasterskaya/crypto-pro-js
[npm-url]: https://npmjs.org/package/crypto-pro-js [npm-url]: https://npmjs.org/package/crypto-pro-js
[npm-version-image]: https://img.shields.io/npm/v/crypto-pro-js.svg?style=flat [npm-version-image]: https://img.shields.io/npm/v/crypto-pro-js.svg?style=flat
[npm-downloads-image]: http://img.shields.io/npm/dm/crypto-pro-js.svg?style=flat [npm-downloads-image]: https://img.shields.io/npm/dm/crypto-pro-js.svg?style=flat
[downloads-url]: https://npmcharts.com/compare/crypto-pro-js?minimal=true [downloads-url]: https://npmcharts.com/compare/crypto-pro-js?minimal=true
[travis-url]: https://www.travis-ci.com/webmasterskaya/crypto-pro-js [actions-url]: https://github.com/webmasterskaya/crypto-pro-js/actions
[travis-image]: http://img.shields.io/travis/webmasterskaya/crypto-pro-js/master.svg?style=flat [actions-image]: https://img.shields.io/github/workflow/status/webmasterskaya/crypto-pro-js/test?event=push
[coveralls-image]: https://coveralls.io/repos/github/webmasterskaya/crypto-pro-js/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/github/webmasterskaya/crypto-pro-js?branch=master

View File

@ -22,7 +22,7 @@
"build": "npm run clean && npm run build:es5 && npm run build:esm", "build": "npm run clean && npm run build:es5 && npm run build:esm",
"pack:clean": "cross-env rimraf %npm_package_name%-%npm_package_version%.tgz", "pack:clean": "cross-env rimraf %npm_package_name%-%npm_package_version%.tgz",
"pack:uncompress": "cross-env tar xopf %npm_package_name%-%npm_package_version%.tgz", "pack:uncompress": "cross-env tar xopf %npm_package_name%-%npm_package_version%.tgz",
"test": "jest --coverage && coveralls < coverage/lcov.info", "test": "jest --coverage",
"lint": "eslint --config .eslintrc.js --ext .ts --ext .js src", "lint": "eslint --config .eslintrc.js --ext .ts --ext .js src",
"lint:fix": "eslint --fix --config .eslintrc.js --ext .ts --ext .js src", "lint:fix": "eslint --fix --config .eslintrc.js --ext .ts --ext .js src",
"examples-update": "npm run examples-update:script-tag", "examples-update": "npm run examples-update:script-tag",