Skip to content

Commit

Permalink
chore: codecov added (#11)
Browse files Browse the repository at this point in the history
* chore: codecov added
  • Loading branch information
anshulrudderstack authored Feb 9, 2024
1 parent 1b1e694 commit 961b872
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tests & Code Coverage

on:
push:
branches:
- master
- main
- "release/*"
pull_request:
branches:
- main
- master
types:
- opened
- synchronize

jobs:
upload-code-coverage:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v2

- name: Set Node 10
uses: actions/setup-node@v3
with:
node-version: 10

- name: Install Node.js Dependencies
run: npm i

- name: Run Tests
run: npm test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ typings/

# Optional npm cache directory
.npm
.github

# Optional eslint cache
.eslintcache
Expand Down
8 changes: 8 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"scripts": {
"dev": "TS_NODE_FILES=true NODE_ENV=development ts-node ./src/cli",
"build": "rm -rf dist && yarn rudder-typer prod && tsc && copyfiles --up 1 \"src/**/*.hbs\" dist/src/",
"test": "jest --testPathIgnorePatterns 'tests/e2e/.*' 'example'",
"test": "jest --testPathIgnorePatterns 'tests/e2e/.*' 'example' --coverage",
"e2e": "make e2e",
"update": "make update",
"lint": "eslint './src/**/*.{ts,tsx}'",
Expand Down

0 comments on commit 961b872

Please sign in to comment.