Skip to content

Commit

Permalink
feat(#12): codecov with nyc
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed May 23, 2024
1 parent 3231687 commit 36bbc15
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# The MIT License (MIT)
#
# Copyright (c) 2024 Aliaksei Bialiauski
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
---
name: codecov
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: codecov-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Node 20
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm install --force -g grunt-cli
- run: npm install --force -g nyc
- run: npm run cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.3.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ pipeline/
.classpath
.recommenders
.factorypath
pyvenv.cfg
.nyc_output/
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"author": "h1alexbel",
"license": "MIT",
"scripts": {
"test": "grunt --no-color"
"test": "grunt --no-color",
"cov": "nyc --all --include src/ npm test"
},
"dependencies": {
"csv-writer": "^1.6.0",
Expand All @@ -26,6 +27,7 @@
"eslint": "8.45.0",
"eslint-config-google": "0.14.0",
"grunt": "^1.6.1",
"nyc": "^15.1.0",
"grunt-contrib-clean": "2.0.1",
"grunt-eslint": "24.3.0",
"grunt-mocha-cli": "^4.0.0",
Expand Down

0 comments on commit 36bbc15

Please sign in to comment.