Skip to content

Commit 406c459

Browse files
committed
fix: switch to codecov in CI
1 parent d038f38 commit 406c459

4 files changed

Lines changed: 8 additions & 17 deletions

File tree

.github/workflows/main.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
- run: yarn lint
2222
- run: yarn test
2323
- run: yarn coverage
24-
- name: Coveralls
25-
uses: coverallsapp/github-action@master
24+
- name: Upload coverage to Codecov
25+
uses: codecov/codecov-action@v4
2626
with:
27-
github-token: ${{ secrets.GITHUB_TOKEN }}
28-
flag-name: run-${{ matrix.node-version }}
29-
parallel: true
27+
token: ${{ secrets.CODECOV_TOKEN }}
28+
flags: node-${{ matrix.node-version }}
29+
fail_ci_if_error: false
3030

3131
semantic-release:
3232
needs: [test]
@@ -40,13 +40,3 @@ jobs:
4040
env:
4141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4242
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
43-
44-
finish:
45-
needs: test
46-
runs-on: ubuntu-latest
47-
steps:
48-
- name: Coveralls Finished
49-
uses: coverallsapp/github-action@master
50-
with:
51-
github-token: ${{ secrets.github_token }}
52-
parallel-finished: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Node-Casbin
22

33
[![GitHub Actions](https://github.com/apache/casbin-node-casbin/workflows/main/badge.svg)](https://github.com/apache/casbin-node-casbin/actions)
4-
[![Coverage Status](https://coveralls.io/repos/github/apache/casbin-node-casbin/badge.svg?branch=master)](https://coveralls.io/github/apache/casbin-node-casbin?branch=master)
4+
[![Coverage Status](https://codecov.io/gh/apache/casbin-node-casbin/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/casbin-node-casbin)
55
[![Release](https://img.shields.io/github/release/apache/casbin-node-casbin.svg)](https://github.com/apache/casbin-node-casbin/releases/latest)
66
[![NPM version][npm-image]][npm-url]
77
[![NPM download][download-image]][download-url]

jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ module.exports = {
77
'csv-parse': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs',
88
},
99
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
10+
coverageReporters: ['lcov', 'text'],
11+
collectCoverageFrom: ['src/**/*.ts'],
1012
};

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"@types/picomatch": "^2.2.2",
3030
"@typescript-eslint/eslint-plugin": "^4.17.0",
3131
"@typescript-eslint/parser": "^4.17.0",
32-
"coveralls": "^3.0.2",
3332
"cz-conventional-changelog": "^3.2.0",
3433
"eslint": "^7.22.0",
3534
"eslint-config-prettier": "^6.12.0",

0 commit comments

Comments
 (0)