Comments (9)
Oh! Obviously you had thought of that.
Thanks
from cobertura-action.
Any update on this issue?
from cobertura-action.
Thanks!
Have you tried setting only_changed_files: true
?
from cobertura-action.
Actually, I tried it, but the report has no files in it, despite the diff containing changed tests and files which those tests covered.
from cobertura-action.
Hey I noticed from a little digging that my issue here was that my coverage report was generated with source = <>
config set.
This means that the filesChanged list from the report is missing the base dir from the filename property.
eg.
File is treepoints/auth/api/users.py
, but in the report it is just auth/api/users.py
.
Phil-Barber#1
One possible solution would be to parse the source(s) from the report xml and then explode the filepaths with the added source(s) (and maybe check to see if they exist in the repo?) so that the filtering here works correctly:
https://github.com/5monkeys/cobertura-action/blob/master/src/action.js#L85
I'd be happy to attempt a fix if you're happy with my proposal?
This also may have nothing to do with Mike's problem....
For now I've changed my coverage::run::source to use ::omit instead of source, so the report is generated from the project root
from cobertura-action.
Bump, if the file names returned from Github don't match with the relative file names in the covertura.xml report, this is still broken. Would be great to fix.
from cobertura-action.
Same here, you already have link_missing_lines_source_dir
. Maybe this can be used as wel in the name matching?
from cobertura-action.
Is this fixed? because I am facing the same issue. The comment does not include the changed files, but a single line for all files report. @Phil-Barber could you please explain more your workaround :)
from cobertura-action.
Is this fixed? because I am facing the same issue. The comment does not include the changed files, but a single line for all files report. @Phil-Barber could you please explain more your workaround :)
It's been a while but if I recall correctly:
Using the source
configuration in coverage
changes the outputted filepaths to be relative to that source directory rather than to the root directory. This created a mismatch between the paths the action is checking (with the source dir prepended) and the paths in the coverage (which don't prepend the source dir).
My workaround was to use the omit
configuration instead of the source
option to omit everything except the source dir. This means the generated coverage report generates paths that are relative to the root dir and so this action correctly identifies them.
from cobertura-action.
Related Issues (20)
- Error: Invalid request. Only 65535 characters are allowed; 100295 were supplied HOT 1
- Allow failling the check without failling to step.
- Error: Not Found HOT 1
- RFC: Threshold for a single file to fail the build HOT 2
- Same file coverage is displayed multiple times
- Coverage Percentage as Output Variable
- Display coverage results as job summary HOT 1
- Not always posting comments
- Node.js 12 actions are deprecated HOT 2
- [Feature Request] Ability to turn off commenting on pull requests HOT 4
- Warning in execute HOT 1
- Error: Resource not accessible by integratio HOT 4
- [Feature request] Add new parameter "minimum_coverage_per_file" HOT 1
- Applying for GitHub publisher verification for "cobertura-action" Action.
- Release new version with Node 16 support? HOT 3
- link missing files fails for windows action HOT 3
- `only_changed_files` option not working HOT 4
- No commit found for SHA: 302de2cbaebb96948ff6419dcaxxxxxx
- Error: EACCES: permission denied, scandir '/lost+found' HOT 2
- Node.js 16 actions are deprecated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cobertura-action.