Add test
This commit is contained in:
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@@ -9,6 +9,9 @@ node {
|
||||
stage('Cleanup') {
|
||||
sh "./gradlew clean"
|
||||
}
|
||||
stage('Test') {
|
||||
sh "./gradlew test"
|
||||
}
|
||||
stage('Build') {
|
||||
sh "./gradlew build"
|
||||
}
|
||||
@@ -19,7 +22,7 @@ node {
|
||||
stage('Publish artifacts') {
|
||||
sh "./gradlew publish"
|
||||
}
|
||||
stage('SonarQube') {
|
||||
stage('SonarQube analysis') {
|
||||
withCredentials([string(credentialsId: 'SONAR_TOKEN', variable: 'SONAR_TOKEN')]) {
|
||||
sh "./gradlew sonarqube -Dsonar.login=$SONAR_TOKEN"
|
||||
}
|
||||
|
||||
14
build.gradle
14
build.gradle
@@ -11,6 +11,7 @@ buildscript {
|
||||
|
||||
plugins {
|
||||
id "org.sonarqube" version "3.0"
|
||||
id 'info.solidsoft.pitest' version '1.5.1'
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -33,6 +34,11 @@ sonarqube {
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'info.solidsoft.pitest'
|
||||
|
||||
pitest {
|
||||
junit5PluginVersion = "0.12"
|
||||
}
|
||||
|
||||
version = '1.9.8'
|
||||
def env = System.getenv()
|
||||
@@ -118,6 +124,10 @@ dependencies {
|
||||
compileOnly 'mouse-tweaks:MouseTweaks:2.13:mc1.16.2'
|
||||
|
||||
runtimeOnly fg.deobf('crafting-tweaks:CraftingTweaks_1.16.2:12.1.0')
|
||||
|
||||
testImplementation('org.junit.jupiter:junit-jupiter-api:5.6.2')
|
||||
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.6.2')
|
||||
testCompile group: 'org.assertj', name: 'assertj-core', version: '3.16.1'
|
||||
}
|
||||
|
||||
jar {
|
||||
@@ -160,6 +170,10 @@ artifacts {
|
||||
archives apiJar
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
|
||||
@@ -123,4 +123,9 @@ public interface IStackList<T> {
|
||||
*/
|
||||
@Nonnull
|
||||
IStackList<T> copy();
|
||||
|
||||
/**
|
||||
* @return the amount of elements in this list
|
||||
*/
|
||||
int size();
|
||||
}
|
||||
|
||||
@@ -157,4 +157,9 @@ public class FluidStackList implements IStackList<FluidStack> {
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return stacks.size();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,4 +155,9 @@ public class ItemStackList implements IStackList<ItemStack> {
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return stacks.size();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user