dice-group / sask

Projectgroups Search and Extraction
GNU Affero General Public License v3.0
2 stars 10 forks source link

Code coverage #59

Closed RicardoUsbeck closed 6 years ago

RicardoUsbeck commented 6 years ago

Use to improve code over time https://codecov.io/

guruprasads7 commented 6 years ago

Hi Ricardo,

I was experimenting with this, as I was made aware by the Intelligent data assistant team.

For java its straight forward, we need to activate the sask repository in https://codecov.io/.

Add a plugin to pom.xml

Produce CodCov Reports

Add Cobertura plugin

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>cobertura-maven-plugin</artifactId>
    <version>2.7</version>
    <configuration>
        <formats>
            <format>html</format>
            <format>xml</format>
        </formats>
        <check />
    </configuration>
</plugin>

and activate this in .travis.yml by adding

script:

I was able to get it work in a seperate repository, Since I don't have admin access to sask repository if you activate it, I'll just add the other dependencies.

guruprasads7 commented 6 years ago

@RicardoUsbeck , @prasanthhs

Can you please enable the sask project in codecov.io. As I'm enabling travis to deploy the microservices on the latest work. I'll also enable the codecov plugin for the sask project.

Thanks, Guru

RicardoUsbeck commented 6 years ago

Should be done.

guruprasads7 commented 6 years ago

@RicardoUsbeck , Codecov has been integrated into the solution. Please find the screen shots indicating the same.

screen shot 2018-07-18 at 18 52 27 screen shot 2018-07-18 at 18 52 52

Please let me know, if this is fine.

RicardoUsbeck commented 6 years ago

If it is documented in the wiki, you can close that issue

guruprasads7 commented 6 years ago

Switch the Covertura maven plugin to JaCoCo. As Covertura plugin fails with java9.

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.9</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
guruprasads7 commented 6 years ago

Closing the issue as the details are captured in the wiki page(https://github.com/dice-group/sask/wiki/Project-Quality-Certifications) as suggested by Ricardo.