Compare commits

...

7 Commits

Author SHA1 Message Date
4605a1c5f9 Updated CI to use new serverside tooling
All checks were successful
islandsurvivalcraft/pipeline/head This commit looks good
2024-11-14 23:19:18 +00:00
00d11f837e Added Java extension pack for devcontainer.
All checks were successful
ydeng/islandsurvivalcraft/pipeline/head This commit looks good
2024-08-05 18:28:04 +00:00
1a7a80d74c Added unit test report.
All checks were successful
ydeng/islandsurvivalcraft/pipeline/head This commit looks good
2024-07-22 05:07:01 +00:00
6a37c9c90b Added devcontainer and updated pipeline.
All checks were successful
ydeng/islandsurvivalcraft/pipeline/head This commit looks good
2024-07-22 04:54:33 +00:00
4487a2cb16 Merge branch 'master' into develop
Some checks failed
ydeng/islandsurvivalcraft/pipeline/head There was a failure building this commit
2024-07-21 04:17:12 +00:00
c39dd426e9 Added devcontainer configuration. 2024-07-21 04:14:46 +00:00
7e156ff2ea initial commit. 2020-05-05 12:24:31 -05:00
8 changed files with 100 additions and 33 deletions

View File

@@ -0,0 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/java
{
"name": "Java",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/java:1-11-bullseye",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
"installGradle": "true"
},
"ghcr.io/devcontainers/features/powershell:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"vscjava.vscode-java-pack"
]
}
}
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "java -version",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

8
.vscode/launch.json vendored
View File

@@ -4,6 +4,12 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{
"type": "java",
"request": "attach",
"name": "Attach by Process ID",
"processId": "${command:PickJavaProcess}"
},
{ {
"type": "java", "type": "java",
"name": "Debug (Launch) - Current File", "name": "Debug (Launch) - Current File",
@@ -19,8 +25,6 @@
"sourcePaths": [ "sourcePaths": [
"src/main/java" "src/main/java"
], ],
"preLaunchTask": "start test server",
"postDebugTask": "stop test server"
} }
] ]
} }

19
Jenkinsfile vendored
View File

@@ -1,22 +1,27 @@
pipeline { pipeline {
agent any agent {
kubernetes {
cloud 'rsys-devel'
defaultContainer 'maven'
inheritFrom 'maven'
}
}
stages { stages {
stage ("Install") { stage ("validate") {
steps { steps {
sh 'mamba env update --file environment.yml'
sh 'echo "mamba activate islandsurvivalcraft" >> ~/.bashrc'
sh "mvn validate" sh "mvn validate"
} }
} }
stage ("Build") { stage ("compile") {
steps { steps {
sh "mvn compile" sh "mvn compile"
} }
} }
stage ("Test") { stage ("test") {
steps { steps {
sh "mvn -Dmaven.test.skip=false test" sh "mvn -Dmaven.test.skip=false test"
junit 'target/surefire-reports/TEST-*.xml' xunit checksName: '', tools: [JUnit(excludesPattern: '', pattern: 'target/surefire-reports/TEST-*.xml', stopProcessingIfError: true)]
recordCoverage(tools: [[parser: 'JUNIT', pattern: 'target/surefire-reports/TEST-*.xml']])
} }
} }
stage ("Package") { stage ("Package") {

View File

@@ -2,5 +2,5 @@ name: islandsurvivalcraft
channels: channels:
- conda-forge - conda-forge
dependencies: dependencies:
- openjdk=11.0.* - openjdk=21
- maven=3.8.* - maven

View File

@@ -1,21 +0,0 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"java.configuration.updateBuildConfiguration": "automatic",
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"cSpell.words": [
"Bukkit",
"crafter",
"itemstack"
]
}
}

6
plugin.yml Normal file
View File

@@ -0,0 +1,6 @@
name: IslandSurvivalCraft
main: ca.recrown.IslandSurvivalCraft
version: 1.0.0
description: Adds the gamemode IslandSurvivalCraft.
commands:
depend: [WorldGuard]

View File

@@ -0,0 +1,38 @@
package ca.recrown.islandsurvivalcraft;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}

View File

@@ -1 +1 @@
Start-Process java -ArgumentList "-Xms512M", "-Xmx1G", "-jar", "craftbukkit.jar", "nogui" Start-Process java -ArgumentList "-Xms512M", "-Xmx1G", "-jar", "paper.jar", "nogui"