Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 52 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
branches: [ v2.x, v3.x ]

permissions:
contents: read
id-token: write

jobs:
unit-tests:
name: Unit tests
Expand All @@ -28,7 +32,15 @@ jobs:
cd /tmp/MockBukkit && ./gradlew publishToMavenLocal -xtest -xjavadoc

- name: Run unit tests
run: mvn -B -ntp -Dmockbukkit.version="$MOCKBUKKIT_VERSION" test
run: mvn -B -ntp -Dmockbukkit.version="$MOCKBUKKIT_VERSION" org.jacoco:jacoco-maven-plugin:0.8.14:prepare-agent test org.jacoco:jacoco-maven-plugin:0.8.14:report

- name: Upload unit test coverage to Codecov
uses: codecov/codecov-action@v5
with:
use_oidc: true
files: ./target/site/jacoco/jacoco.xml
flags: unit
name: unit-tests

feature-tests:
name: Feature tests
Expand All @@ -54,7 +66,15 @@ jobs:
cd /tmp/MockBukkit && ./gradlew publishToMavenLocal -xtest -xjavadoc

- name: Run feature tests
run: mvn -B -ntp -Pfeature-tests -Dtest=*FeatureTest -Dmockbukkit.version="$MOCKBUKKIT_VERSION" test
run: mvn -B -ntp -Pfeature-tests -Dtest=*FeatureTest -Dmockbukkit.version="$MOCKBUKKIT_VERSION" org.jacoco:jacoco-maven-plugin:0.8.14:prepare-agent test org.jacoco:jacoco-maven-plugin:0.8.14:report

- name: Upload feature test coverage to Codecov
uses: codecov/codecov-action@v5
with:
use_oidc: true
files: ./target/site/jacoco/jacoco.xml
flags: feature
name: feature-tests

# ──────────────────────────────────────────────────────────────────────────
# SMOKE TESTS — verify EzAfk loads without errors on each server platform.
Expand Down Expand Up @@ -143,6 +163,16 @@ jobs:
fi
done
kill $SERVER_PID 2>/dev/null || true
for _ in $(seq 1 15); do
if ! kill -0 $SERVER_PID 2>/dev/null; then
break
fi
sleep 1
done
if kill -0 $SERVER_PID 2>/dev/null; then
echo "Server did not stop after SIGTERM; forcing shutdown"
kill -9 $SERVER_PID 2>/dev/null || true
fi
wait $SERVER_PID 2>/dev/null || true

- name: Assert no EzAfk errors
Expand Down Expand Up @@ -235,6 +265,16 @@ jobs:
fi
done
kill $SERVER_PID 2>/dev/null || true
for _ in $(seq 1 15); do
if ! kill -0 $SERVER_PID 2>/dev/null; then
break
fi
sleep 1
done
if kill -0 $SERVER_PID 2>/dev/null; then
echo "Server did not stop after SIGTERM; forcing shutdown"
kill -9 $SERVER_PID 2>/dev/null || true
fi
wait $SERVER_PID 2>/dev/null || true

- name: Assert no EzAfk errors
Expand Down Expand Up @@ -327,6 +367,16 @@ jobs:
fi
done
kill $SERVER_PID 2>/dev/null || true
for _ in $(seq 1 15); do
if ! kill -0 $SERVER_PID 2>/dev/null; then
break
fi
sleep 1
done
if kill -0 $SERVER_PID 2>/dev/null; then
echo "Server did not stop after SIGTERM; forcing shutdown"
kill -9 $SERVER_PID 2>/dev/null || true
fi
wait $SERVER_PID 2>/dev/null || true

- name: Assert no EzAfk errors
Expand Down
1 change: 1 addition & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Dmockbukkit.version=4.113.1
187 changes: 186 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<paper.version>26.1.2.build.57-stable</paper.version>
<bstats.version>3.1.0</bstats.version>
<worldguard.version>7.0.13</worldguard.version>
<jetbrains.annotations.version>26.0.2-1</jetbrains.annotations.version>
<errorprone.annotations.version>2.41.0</errorprone.annotations.version>
<log4j.api.version>2.25.2</log4j.api.version>
<maven.compiler.plugin.version>3.15.0</maven.compiler.plugin.version>
<maven.shade.plugin.version>3.6.2</maven.shade.plugin.version>
<jaloquent.version>1.3.2</jaloquent.version>
Expand Down Expand Up @@ -64,8 +67,62 @@
<artifactId>paper-api</artifactId>
<version>${paper.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Note: `paper-api` is declared with `provided` scope above; do not duplicate it here -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.11.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>${errorprone.annotations.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>${jetbrains.annotations.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.17</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
Expand All @@ -77,6 +134,32 @@
<artifactId>worldguard-bukkit</artifactId>
<version>${worldguard.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>it.unimi.dsi</groupId>
<artifactId>fastutil</artifactId>
</exclusion>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
<exclusion>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Kyori Adventure API (MiniMessage) — shaded into the plugin JAR and
relocated to an internal package so it works on both Paper (which
Expand Down Expand Up @@ -108,11 +191,23 @@
<groupId>net.kyori</groupId>
<artifactId>examination-api</artifactId>
<version>1.3.0</version>
<exclusions>
<exclusion>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>examination-string</artifactId>
<version>1.3.0</version>
<exclusions>
<exclusion>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javazoom</groupId>
Expand All @@ -137,12 +232,48 @@
<artifactId>ezcountdown</artifactId>
<version>2.0.1</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
</exclusion>
<exclusion>
<groupId>net.kyori</groupId>
<artifactId>adventure-api</artifactId>
</exclusion>
<exclusion>
<groupId>net.kyori</groupId>
<artifactId>adventure-key</artifactId>
</exclusion>
<exclusion>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
</exclusion>
<exclusion>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-serializer-legacy</artifactId>
</exclusion>
<exclusion>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
</exclusion>
<exclusion>
<groupId>org.bstats</groupId>
<artifactId>bstats-base</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.NEZNAMY</groupId>
<artifactId>TAB-API</artifactId>
<version>5.5.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.MilkBowl</groupId>
Expand All @@ -155,6 +286,32 @@
<artifactId>placeholderapi</artifactId>
<version>2.11.5</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
</exclusion>
<exclusion>
<groupId>org.bstats</groupId>
<artifactId>bstats-base</artifactId>
</exclusion>
<exclusion>
<groupId>net.kyori</groupId>
<artifactId>adventure-api</artifactId>
</exclusion>
<exclusion>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-serializer-legacy</artifactId>
</exclusion>
<exclusion>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-serializer-gson</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.EzFramework</groupId>
Expand All @@ -167,6 +324,16 @@
<artifactId>jaker</artifactId>
<version>1.0.6</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.EzFramework.Jaker</groupId>
Expand Down Expand Up @@ -275,7 +442,7 @@
<version>3.5.5</version>
<configuration>
<useModulePath>false</useModulePath>
<argLine>-Dnet.bytebuddy.experimental=true</argLine>
<argLine>${argLine} -Dnet.bytebuddy.experimental=true</argLine>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -314,6 +481,24 @@
<version>${mockbukkit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mysql</artifactId>
<version>1.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>9.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
Expand Down
Loading
Loading