Adding codecov support. (#13)

* Adding code codecov support.

* Adding status badges for codecov and CI.

* Fixes to codecov in CI.

* Checking build directory.

* Syntax error.

* Fixing xml path.

* Removing token.
This commit is contained in:
Claudius Tewari
2020-07-02 21:45:42 -07:00
committed by GitHub
parent 2e7cdf008b
commit 09eea8bb53
5 changed files with 32 additions and 3 deletions

View File

@@ -65,10 +65,21 @@ jobs:
with:
java-version: 11
# Run Gradle tests.
# Run Gradle build.
- run: |
chmod +x gradlew
./gradlew test
./gradlew build
# Run Gradle tests.
- run: ./gradlew test
# Generate Coverage Report.
- run: ./gradlew jacocoTestReport
# Publish Coverage Report.
- uses: codecov/codecov-action@v1
with:
file: ./photon-server/build/reports/jacoco/test/jacocoTestReport.xml
build-package:
needs: [build-client, build-server]

View File

@@ -1,5 +1,8 @@
# Photon Vision
[![CI](https://github.com/PhotonVision/photonvision/workflows/CI/badge.svg)](https://github.com/PhotonVision/photonvision/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/PhotonVision/photonvision/branch/master/graph/badge.svg)](https://codecov.io/gh/PhotonVision/photonvision)
This is fork of [Chameleon Vision](https://github.com/Chameleon-Vision/chameleon-vision/), a free open-source software for FRC teams to use for vision processing on their robots. Thank you to everyone who worked on the original project.
For information on contributing or running PhotonVision, please read our documentation on ReadTheDocs.

5
codecov.yml Normal file
View File

@@ -0,0 +1,5 @@
coverage:
# Turning off commit status to prevent failed checks if coverage decreases
status:
project: no
patch: no

View File

@@ -3,7 +3,7 @@ bin/*
.project
.classpath
*.prefs
chameleon-vision
photonvision
.gradle
.gradle/*
build

View File

@@ -3,6 +3,7 @@ plugins {
id 'com.github.johnrengelman.shadow' version '5.2.0'
id "com.diffplug.gradle.spotless" version "3.28.0"
id "application"
id "jacoco"
}
group 'org.photonvision'
@@ -19,6 +20,7 @@ repositories {
url = 'https://frcmaven.wpi.edu:443/artifactory/development'
}
}
ext {
wpilibVersion = '2020.3.2-75-g1557a4c'
openCVVersion = '3.4.7-2'
@@ -124,3 +126,11 @@ spotless {
licenseHeaderFile "$rootDir/LicenseHeader.txt"
}
}
jacocoTestReport {
dependsOn test // Tests are required to run before generating the report
reports {
xml.enabled true
}
}