Skip to content

Commit

Permalink
feat(codecov): switch to github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
panjizhi committed Jun 16, 2023
1 parent 6960e2a commit 9a99824
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 24 deletions.
9 changes: 0 additions & 9 deletions .codecov.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 9a99824

Please sign in to comment.