diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 60b1a5d..0000000 --- a/.codecov.yml +++ /dev/null @@ -1,9 +0,0 @@ -codecov: - branch: main - -coverage: - status: - project: - default: - # Fail the status if coverage drops by >= 0.1% - threshold: 0.1 diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..817313c --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,32 @@ +name: Code Coverage +on: [push, pull_request] +jobs: + run: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [10.x, 12.x, 14.x, 16.x] + env: + OS: ubuntu-latest + NODE_VERSION: ${{ matrix.node-version }} + steps: + - uses: actions/checkout@master + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@master + with: + node-version: ${{ matrix.node-version }} + - name: Generate coverage report + run: | + npm install + npm run build --if-present + npm test + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + directory: ./coverage + env_vars: OS,NODE_VERSION + fail_ci_if_error: true + flags: unittests + name: codecov-umbrella + verbose: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 09ff09c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - '12' - - '14' - -before_script: - - npm install codecov -g - - npm install - -after_script: - - codecov - - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index fd32c1f..4ff08bf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # gm-crypto -[![Build Status](https://travis-ci.com/byte-fe/gm-crypto.svg?branch=main)](https://travis-ci.com/byte-fe/gm-crypto) +[![Build Status](https://github.com/byte-fe/gm-crypto/actions/workflows/codecov.yml/badge.svg)](https://github.com/byte-fe/gm-crypto/actions/workflows/codecov.yml) [![codecov](https://codecov.io/gh/byte-fe/gm-crypto/branch/main/graph/badge.svg?token=5UbUw8VKYh)](https://codecov.io/gh/byte-fe/gm-crypto) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) diff --git a/package-lock.json b/package-lock.json index caecba3..62220ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,8 @@ "requires": true, "packages": { "": { - "version": "0.1.7", + "name": "gm-crypto", + "version": "0.1.10", "license": "MIT", "dependencies": { "buffer": "^5.7.0", diff --git a/package.json b/package.json index 95f51ea..e02c3bc 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "clean": "rm -rf dist", "build": "npm run clean && microbundle --entry src/index.js --sourcemap false", "build:coverage": "npm run clean && microbundle --entry src/index.js --sourcemap true", - "test": "npm run build:coverage && nyc --reporter=text --reporter=lcovonly ava -v", + "test": "npm run build:coverage && nyc --reporter=json ava -v", "prepublishOnly": "npm run build" }, "repository": {