mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2025-01-31 10:10:33 +01:00
Use codecov for code coverage (#25)
* Use codecov for code coverage * Change codacy coverage badge with codecov * Unify repo badges * Update download link * Update unit tests
This commit is contained in:
parent
690b730494
commit
aae3d5d357
@ -69,7 +69,10 @@ jobs:
|
|||||||
name: Run Tests
|
name: Run Tests
|
||||||
command: ./gradlew --no-daemon --stacktrace test
|
command: ./gradlew --no-daemon --stacktrace test
|
||||||
- run:
|
- run:
|
||||||
name: Upload code coverage
|
name: Upload code coverage to codecov
|
||||||
|
command: ./gradlew --no-daemon --stacktrace jacocoTestReport && bash <(curl -s https://codecov.io/bash)
|
||||||
|
- run:
|
||||||
|
name: Upload code coverage to codacy
|
||||||
command: ./gradlew --no-daemon --stacktrace codacyUpload
|
command: ./gradlew --no-daemon --stacktrace codacyUpload
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: ./app/build/reports/tests/
|
path: ./app/build/reports/tests/
|
||||||
|
10
README.md
10
README.md
@ -1,11 +1,11 @@
|
|||||||
# Wulkanowy
|
# Wulkanowy
|
||||||
|
|
||||||
[![Codacy Grade Badge](https://api.codacy.com/project/badge/Grade/b0365aa6584a4c1abf36141204bc8de3)](https://www.codacy.com/app/wulkanowy/wulkanowy)
|
[![Codacy grade](https://img.shields.io/codacy/grade/b0365aa6584a4c1abf36141204bc8de3.svg?style=flat-square)](https://www.codacy.com/app/wulkanowy/wulkanowy)
|
||||||
[![Codacy Coverage Badge](https://api.codacy.com/project/badge/Coverage/b0365aa6584a4c1abf36141204bc8de3)](https://www.codacy.com/app/wulkanowy/wulkanowy)
|
[![Codecov](https://img.shields.io/codecov/c/github/wulkanowy/wulkanowy.svg?style=flat-square)](https://codecov.io/gh/wulkanowy/wulkanowy)
|
||||||
[![Build Status](https://www.bitrise.io/app/daeff1893f3c8128.svg?token=Hjm1ACamk86JDeVVJHOeqQ&branch=master)](https://www.bitrise.io/app/daeff1893f3c8128)
|
|
||||||
[![Dependency Status](https://www.versioneye.com/user/projects/5969ff0b0fb24f004f8c711b/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/5969ff0b0fb24f004f8c711b)
|
[![Dependency Status](https://www.versioneye.com/user/projects/5969ff0b0fb24f004f8c711b/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/5969ff0b0fb24f004f8c711b)
|
||||||
[![CircleCI](https://circleci.com/gh/wulkanowy/wulkanowy.svg?style=svg)](https://circleci.com/gh/wulkanowy/wulkanowy)
|
[![CircleCI](https://img.shields.io/circleci/project/github/wulkanowy/wulkanowy.svg?style=flat-square)](https://circleci.com/gh/wulkanowy/wulkanowy)
|
||||||
|
[![Build Status](https://www.bitrise.io/app/daeff1893f3c8128.svg?token=Hjm1ACamk86JDeVVJHOeqQ&branch=master)](https://www.bitrise.io/app/daeff1893f3c8128)
|
||||||
|
|
||||||
[Pobierz wersję rozwojową](https://www.bitrise.io/artifact/2280287/p/d79bc4af6825cb9f807b060d67a1c321)
|
[Pobierz wersję rozwojową](https://bitrise-redirector.herokuapp.com/v0.1/apps/daeff1893f3c8128/builds/master/artifacts/app-debug.apk)
|
||||||
|
|
||||||
Wulkanowy to projekt aplikacji na androida ułatwiającej używanie dziennika VULCANa.
|
Wulkanowy to projekt aplikacji na androida ułatwiającej używanie dziennika VULCANa.
|
||||||
|
@ -56,7 +56,11 @@ public class GradesList extends Vulcan {
|
|||||||
Pattern pattern = Pattern.compile("#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})");
|
Pattern pattern = Pattern.compile("#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})");
|
||||||
Matcher matcher = pattern.matcher(row.select("td:nth-child(2) span.ocenaCzastkowa")
|
Matcher matcher = pattern.matcher(row.select("td:nth-child(2) span.ocenaCzastkowa")
|
||||||
.attr("style"));
|
.attr("style"));
|
||||||
String color = matcher.find() ? matcher.group(1) : "";
|
|
||||||
|
String color = "";
|
||||||
|
while (matcher.find()) {
|
||||||
|
color = matcher.group(1);
|
||||||
|
}
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy", Locale.ROOT);
|
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy", Locale.ROOT);
|
||||||
Date d = sdf.parse(row.select("td:nth-child(5)").text());
|
Date d = sdf.parse(row.select("td:nth-child(5)").text());
|
||||||
|
@ -2,24 +2,12 @@ package io.github.wulkanowy.api.grades;
|
|||||||
|
|
||||||
public class Subject {
|
public class Subject {
|
||||||
|
|
||||||
private int id;
|
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private String predictedRating;
|
private String predictedRating;
|
||||||
|
|
||||||
private String finalRating;
|
private String finalRating;
|
||||||
|
|
||||||
public int getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Subject setId(int id) {
|
|
||||||
this.id = id;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -200,9 +200,7 @@ public class Account {
|
|||||||
myDao.update(this);
|
myDao.update(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** called by internal mechanisms, do not call yourself. */
|
||||||
* called by internal mechanisms, do not call yourself.
|
|
||||||
*/
|
|
||||||
@Generated(hash = 1812283172)
|
@Generated(hash = 1812283172)
|
||||||
public void __setDaoSession(DaoSession daoSession) {
|
public void __setDaoSession(DaoSession daoSession) {
|
||||||
this.daoSession = daoSession;
|
this.daoSession = daoSession;
|
||||||
|
@ -180,9 +180,7 @@ public class Subject {
|
|||||||
myDao.update(this);
|
myDao.update(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** called by internal mechanisms, do not call yourself. */
|
||||||
* called by internal mechanisms, do not call yourself.
|
|
||||||
*/
|
|
||||||
@Generated(hash = 937984622)
|
@Generated(hash = 937984622)
|
||||||
public void __setDaoSession(DaoSession daoSession) {
|
public void __setDaoSession(DaoSession daoSession) {
|
||||||
this.daoSession = daoSession;
|
this.daoSession = daoSession;
|
||||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||||||
import io.github.wulkanowy.dao.entities.Grade;
|
import io.github.wulkanowy.dao.entities.Grade;
|
||||||
|
|
||||||
|
|
||||||
public class EntitiesCompareTest {
|
public class EntitiesCompareTest extends EntitiesCompare {
|
||||||
|
|
||||||
private List<Grade> newList = new ArrayList<>();
|
private List<Grade> newList = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ public class GradeTest {
|
|||||||
Assert.assertEquals(R.color.one_grade, new Grade().setValue("1+").getValueColor());
|
Assert.assertEquals(R.color.one_grade, new Grade().setValue("1+").getValueColor());
|
||||||
Assert.assertEquals(R.color.one_grade, new Grade().setValue("+1").getValueColor());
|
Assert.assertEquals(R.color.one_grade, new Grade().setValue("+1").getValueColor());
|
||||||
Assert.assertEquals(R.color.default_grade, new Grade().setValue("Np").getValueColor());
|
Assert.assertEquals(R.color.default_grade, new Grade().setValue("Np").getValueColor());
|
||||||
|
Assert.assertEquals(R.color.default_grade, new Grade().setValue("7").getValueColor());
|
||||||
Assert.assertEquals(R.color.default_grade, new Grade().setValue("").getValueColor());
|
Assert.assertEquals(R.color.default_grade, new Grade().setValue("").getValueColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,5 +32,22 @@ public class GradeTest {
|
|||||||
|
|
||||||
Assert.assertEquals(new Grade().setSubject("Religia").setValue("5").hashCode(),
|
Assert.assertEquals(new Grade().setSubject("Religia").setValue("5").hashCode(),
|
||||||
new Grade().setSubject("Religia").setValue("5").hashCode());
|
new Grade().setSubject("Religia").setValue("5").hashCode());
|
||||||
|
|
||||||
|
Assert.assertFalse(new Grade().setSubject("Informatyka")
|
||||||
|
.equals(new FakeGrade().setSubject("Informatyka")));
|
||||||
|
|
||||||
|
Assert.assertFalse(new Grade().setSubject("Informatyka")
|
||||||
|
.equals(null));
|
||||||
|
}
|
||||||
|
|
||||||
|
private class FakeGrade {
|
||||||
|
|
||||||
|
private String subject;
|
||||||
|
|
||||||
|
private FakeGrade setSubject(String subject) {
|
||||||
|
this.subject = subject;
|
||||||
|
this.subject = this.subject + subject;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
build.gradle
12
build.gradle
@ -4,12 +4,8 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven {
|
maven { url "https://plugins.gradle.org/m2/" }
|
||||||
url "https://plugins.gradle.org/m2/"
|
maven { url 'https://maven.google.com' }
|
||||||
}
|
|
||||||
maven {
|
|
||||||
url 'https://maven.google.com'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||||
@ -26,9 +22,7 @@ allprojects {
|
|||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven {
|
maven { url 'https://maven.google.com' }
|
||||||
url 'https://maven.google.com'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user