-
Notifications
You must be signed in to change notification settings - Fork 26
Implementing code coverage #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
407162c
initial implementation for code coverage
suhaani-agarwal 117dc25
added covr package
suhaani-agarwal 8004af8
checking only js coverage
suhaani-agarwal 94049e2
updated tests.yaml
suhaani-agarwal 30ebdb4
updated tests.yaml
suhaani-agarwal b94919c
testing only r coverage
suhaani-agarwal d82f2cd
trying out a simpler approach
suhaani-agarwal d3dc471
updated tests.yaml
suhaani-agarwal 2805a59
deleted unnecessary file
suhaani-agarwal cdf6b9c
trying out another method
suhaani-agarwal 3359121
updated tests.yaml
suhaani-agarwal e8fe132
removed syntax error
suhaani-agarwal 208c16c
added coverage
suhaani-agarwal 8267779
added js coverage collection
suhaani-agarwal 7108024
added codecov token to repository secrets
suhaani-agarwal 9808c80
seperated coverage and increased chromote timeout
suhaani-agarwal ac28106
increased chromote timeout
suhaani-agarwal 2b0f4a9
checking if the implementation works without the test causing timeout
suhaani-agarwal caa7f98
corrected js coverage collection
suhaani-agarwal fbe1f8c
removed syntax error in tests.yaml
suhaani-agarwal 5812b69
updated testthat.R for correct JS coverage
suhaani-agarwal 1383f40
corrected path for js coverage file save
suhaani-agarwal 4f4db04
removed error from tests.yaml
suhaani-agarwal e2f1375
removed npx
suhaani-agarwal 946b536
removed -g in installation
suhaani-agarwal 0e0a638
replaced npx with paths
suhaani-agarwal 03aa950
corrected node installation path
suhaani-agarwal fc2e1a1
corrected node installation path
suhaani-agarwal d528af2
shifted installation of node to last step
suhaani-agarwal b684b6c
replaced npx
suhaani-agarwal 9aaf93d
using /usr/bin/sudo
suhaani-agarwal 731ee38
installing node with different approach
suhaani-agarwal 4c48e59
installing node
suhaani-agarwal 6f962e8
updated installing node
suhaani-agarwal 7ff84ae
manually converting raw coverage to lcov
suhaani-agarwal 070d92b
updated conversion function for all js files
suhaani-agarwal 0ac7a38
added test to check if the coverage conversion works correctly
suhaani-agarwal e4d8ac8
updated conversion function
suhaani-agarwal f15d318
using v8-to-istanbul.js
suhaani-agarwal 9449b09
removed unnecessary changes and ignoring files under vendor/
suhaani-agarwal ca8ebb1
added Node.js related files to .Rbuildignore
suhaani-agarwal 4ed642a
bringing the PredictedPeaks test back (caused problem - chromote time…
suhaani-agarwal 50ef480
cran check will now fail for WARNING and NOTE
suhaani-agarwal 9618971
updated build.sh to add cran check fail for warnings and notes
suhaani-agarwal 2e54580
added v8-to-istanbul.js to .Rbuildignore
suhaani-agarwal aa40873
added echo in build.sh and increased chromote timeout
suhaani-agarwal 3bf89cf
made PredictedPeaks test lighter
suhaani-agarwal a4333bd
updated repo name in README and removed addition of empty spaces
suhaani-agarwal 1e46b2e
added copy of dataset, improved indentations, brought back 2 deleted …
suhaani-agarwal 54eeac5
added test case for chroms and oneChrom for 2nd viz
suhaani-agarwal 94d0b0e
updated NEWS.md
suhaani-agarwal cba32ec
updated NEWS.md
suhaani-agarwal 1065d7f
version++
suhaani-agarwal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,8 @@ jobs: | |
TEST_SUITE: ${{ matrix.test-suite }} | ||
GITHUB_PAT: ${{ secrets.PAT_GITHUB }} | ||
GH_ACTION: "ENABLED" | ||
COLLECT_COVERAGE: "TRUE" | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install and update texlive | ||
|
@@ -35,6 +37,49 @@ jobs: | |
|
||
- name: git config user.email | ||
run: git config --global user.email [email protected] | ||
|
||
- name: Setup Node.js | ||
if: matrix.test-suite == 'renderer' | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install Node.js dependencies | ||
if: matrix.test-suite == 'renderer' | ||
run: | | ||
npm install v8-to-istanbul | ||
echo "Node modules installed" | ||
|
||
- name: run tests | ||
run: if [ "$TEST_SUITE" == "CRAN" ];then bash build.sh;else Rscript -e "source('tests/testthat.R', chdir = TRUE)";fi | ||
run: | | ||
if [ "$TEST_SUITE" == "CRAN" ]; then | ||
bash build.sh | ||
elif [ "$TEST_SUITE" == "compiler" ]; then | ||
Rscript -e "source('tests/testthat.R', chdir = TRUE)" | ||
Rscript -e 'covr::codecov(quiet = TRUE)' | ||
else | ||
Rscript -e "source('tests/testthat.R', chdir = TRUE)" | ||
fi | ||
|
||
- name: Convert JS coverage to Istanbul format | ||
if: matrix.test-suite == 'renderer' | ||
run: | | ||
if [ -f "tests/testthat/js-coverage.json" ]; then | ||
echo "Converting JS coverage to LCOV format..." | ||
node v8-to-istanbul.js | ||
else | ||
echo "No JS coverage file found" | ||
exit 1 | ||
fi | ||
|
||
- name: Upload JS coverage to Codecov | ||
if: matrix.test-suite == 'renderer' | ||
run: | | ||
if [ -f "coverage-istanbul.json" ]; then | ||
curl -Os https://uploader.codecov.io/latest/linux/codecov | ||
chmod +x codecov | ||
./codecov -f coverage-istanbul.json -t ${{ secrets.CODECOV_TOKEN }} --flags javascript | ||
else | ||
echo "No coverage file found" | ||
exit 1 | ||
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ | |
*ANIMINT_TEST_FOO | ||
*pids.txt | ||
*~ | ||
.vscode/settings.json | ||
.vscode/settings.jsonnode_modules/ | ||
node_modules/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "animint2", | ||
"version": "1.0.0", | ||
"description": "<a href=\"https://github.com/tdhock/animint2/actions/workflows/tests.yaml\"> \t<img src=\"https://github.com/tdhock/animint2/actions/workflows/tests.yaml/badge.svg\" \t alt=\"A badge verifying if this package has passed all its tests.\"> </a> <!-- Feel free to change the HTML block above this comment into Markdown. It's just in HTML cuz I couldn't be arsed to figure out how to correctly combine an image and a link in Github-flavored Markdown. -->", | ||
"main": "index.js", | ||
"directories": { | ||
"doc": "docs", | ||
"man": "man", | ||
"test": "tests" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/animint/animint2.git" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/animint/animint2/issues" | ||
}, | ||
"homepage": "https://github.com/animint/animint2#readme", | ||
"dependencies": { | ||
"v8-to-istanbul": "^9.3.0" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.