Skip to content

Commit

Permalink
ci: add codecov for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
arusakov committed Oct 2, 2024
1 parent d22afb5 commit a2fc660
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@ jobs:
env:
REDIS_HOST: redis
REDIS_PORT: 6379
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true # optional (default = false)

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build": "tsc -p .",
"compile": "yarn build --noEmit",
"test:all": "yarn test ./test/*.test.ts",
"test:coverage": "c8 --reporter=text --reporter=text-summary yarn test:all",
"test:coverage": "c8 --reporter=lcovonly --reporter=text yarn test:all",
"test": "node --test --test-concurrency=1 --require=ts-node/register"
},
"engines": {
Expand Down
3 changes: 1 addition & 2 deletions test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import { WSDiscovery } from "../src"
import { ID } from "../src/constants"

export const createRedis = () => {

return new Redis({
lazyConnect: true,
host: process.env.REDIS_HOST,
port: Number(process.env.REDIS_PORT),
port: Number(process.env.REDIS_PORT) || undefined,
})
}

Expand Down

0 comments on commit a2fc660

Please sign in to comment.