diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100755 index 0000000..b55097b --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c159f6a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - lts/* diff --git a/README.md b/README.md index 011ac16..c10ad1f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ +[![License][license-image]][license-url] [![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][downloads-url] -[![Build Status][travis-image]][travis-url] -[![Coverage Status][coveralls-image]][coveralls-url] +[![Build Status][actions-image]][actions-url] + # cryptoPro @@ -200,11 +201,11 @@ npm unlink # Лицензия [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-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 -[travis-url]: https://www.travis-ci.com/webmasterskaya/crypto-pro-js -[travis-image]: http://img.shields.io/travis/webmasterskaya/crypto-pro-js/master.svg?style=flat -[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 +[actions-url]: https://github.com/webmasterskaya/crypto-pro-js/actions +[actions-image]: https://img.shields.io/github/workflow/status/webmasterskaya/crypto-pro-js/test?event=push diff --git a/package.json b/package.json index 5c8b329..b1b3340 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "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: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:fix": "eslint --fix --config .eslintrc.js --ext .ts --ext .js src", "examples-update": "npm run examples-update:script-tag",