mirror of
https://github.com/tiennm99/caro.git
synced 2026-06-04 08:12:41 +00:00
5b68ee9cc4
Build system modernization:
- Delete root parent pom.xml; server/pom.xml is now standalone.
- Drop Spring Boot parent; use maven-shade-plugin 3.6.0 for fat jar.
- Upgrade source/target to Java 25 (LTS); pin explicit dep versions:
netty-all 4.1.115.Final, protobuf-java 3.25.5, gson 2.11.0,
junit-jupiter 5.11.3, maven-compiler-plugin 3.13.0,
maven-surefire-plugin 3.5.2, maven-shade-plugin 3.6.0.
- New coordinates: com.miti99.caro:caro-server:0.0.1-beta.
- Shade transformers: manifest (main class), services, appending
(Netty io.netty.versions.properties merge).
Dependency migration:
- Replace com.smallnico:noson with gson across 5 files (7 call sites):
MapHelper, TransferProtocolUtils, ServerEventListener_CODE_GAME_WATCH,
ServerEventListener_CODE_GET_ROOMS, ServerEventListener_CODE_ROOM_CREATE.
All call sites now funnel through existing JsonUtils wrapper (DRY).
- Migrate GomokuHelperTest + GomokuAITest from JUnit 4 to JUnit 5
(org.junit.Test -> org.junit.jupiter.api.Test,
org.junit.Assert.* -> org.junit.jupiter.api.Assertions.*).
Directory + infra:
- git mv landlords-server/ -> server/.
- Rewrite server/Dockerfile: Java 25 base images
(maven:3.9-eclipse-temurin-25 build, eclipse-temurin:25-jre-alpine runtime),
simplified COPY paths (no more multi-module layout).
- docker-compose.yml: dockerfile points to server/Dockerfile.
- .github/workflows/build.yml: setup-java temurin 25,
`mvn -f server/pom.xml -B clean verify`.
Validation: mvn verify on Java 25 passes all 37 tests (29 GomokuHelper
+ 8 GomokuAI), shade produces caro-server-0.0.1-beta.jar cleanly.
Note: package names remain org.nico.ratel.landlords.* in this phase;
renamed to com.miti99.caro.{common,server}.* in Phase 4.
39 lines
880 B
YAML
39 lines
880 B
YAML
name: Build & Test
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths-ignore: ['**/*.md', '.gitignore']
|
|
pull_request:
|
|
branches: [master]
|
|
paths-ignore: ['**/*.md', '.gitignore']
|
|
|
|
jobs:
|
|
build-server:
|
|
name: Build Server (Java)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 25
|
|
cache: maven
|
|
- run: mvn -f server/pom.xml -B clean verify
|
|
|
|
build-web-client:
|
|
name: Build Web Client
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: web-client
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
cache-dependency-path: web-client/package-lock.json
|
|
- run: npm ci
|
|
- run: npm run build
|