Commit Graph

57 Commits

Author SHA1 Message Date
darroyo 698e52eefc fix(ci): run build-jvm and build-native inside maven container image
CI / Build JVM (push) Failing after 16s
CI / Build Native (push) Failing after 51s
CI / Build & Push Native Image (push) Has been skipped
Runner has no Maven or JDK installed. Instead of installing
both manually each job, run the jobs inside the official
maven:3.9.6-eclipse-temurin-21 image which has both pre-installed.

- Drop actions/setup-java (image has JDK 21)
- Drop 'Install Maven' step (image has Maven 3.9.6)
- Add 'container: image: maven:3.9.6-eclipse-temurin-21' to each job
- Add cache for ~/.m2/repository (key on pom.xml hash)
- Keep graalvm/setup-graalvm only for the native job (adds GraalVM
  inside the container)
- docker-native job unchanged: uses the runner's docker daemon
  directly to build the image with the pre-built native binary
2026-08-12 17:04:33 -04:00
darroyo f3af0f8975 fix(ci): install Maven in each job (runner has no mvn binary)
CI / Build JVM (push) Failing after 2m56s
CI / Build Native (push) Failing after 21m20s
CI / Build & Push Native Image (push) Has been skipped
The runner has Java (via setup-java) but no Maven. Add an
Install Maven step to build-jvm and build-native that downloads
Maven 3.9.6 from Apache to runner.workspace/.maven and adds it
to the PATH via $GITHUB_PATH. Idempotent: the if-guard skips
redownload if the binary already exists on the runner.
2026-08-12 16:33:02 -04:00
darroyo f2c758eff1 fix(ci): drop container image pull, use setup-java + setup-graalvm
CI / Build Native (push) Failing after 3m48s
CI / Build & Push Native Image (push) Has been skipped
CI / Build JVM (push) Has been cancelled
The Quarkus image (docker.io/quarkusio/quarkus-images:tooling-21)
cannot be pulled by the runner (access denied). Replace the
container: block with the standard actions/setup-java (Temurin 21)
and graalvm/setup-graalvm (with native-image component) actions
so the jobs run on the host directly.
2026-08-12 16:26:49 -04:00
darroyo 14e892539a ci: rename registry secrets to REGISTRY_USERNAME/REGISTRY_TOKEN
CI / Build Native (push) Failing after 2s
CI / Build JVM (push) Failing after 1s
CI / Build & Push Native Image (push) Has been skipped
Aligns with the secret names configured in the Gitea repo
settings instead of the originally assumed GITEA_*/GITEA_* names.
2026-08-12 16:22:33 -04:00
darroyo 9db3f7a914 ci: build native Docker image and push to Gitea Container Registry
CI / Build Native (push) Failing after 2s
CI / Build JVM (push) Failing after 7s
CI / Build & Push Native Image (push) Has been skipped
Adds:
- Dockerfile based on quarkus-micro-image:2.0 (~50MB base)
  Runs the native binary as non-root user 1001, exposes 8080
- .dockerignore to exclude build artifacts
- Gitea Actions workflow with 3 parallel jobs:
  - build-jvm: standard JAR (mvn package)
  - build-native: GraalVM native binary (mvn package -Pnative)
  - docker-native: takes the native binary artifact, builds
    the container image and pushes to
    gitea.danielarroyo.cl/proyectos/shot-crafter-calculator
    with tags 'latest' and short SHA

Triggers: push to main and PRs (docker job only on push).
Required secrets: GITEA_USERNAME, GITEA_TOKEN (write:packages).
2026-08-12 16:16:51 -04:00
darroyo 47e24df40d chore: confirm working tree clean
All files committed in 9c9fb3a. Branch is up to date with origin/main.
- 57 files committed
- 6260 insertions
- Working tree clean
- 35/35 browser tests passing
2026-08-12 16:04:37 -04:00
darroyo 9c9fb3a2ca feat: shot-crafter-calculator with H2 persistence and production history
Quarkus 3.20.1 monolith serving React 18 + TypeScript + Tailwind SPA.

Features:
- Three-tab calculator (Insumos, Fórmulas, Calculadora) for
  Soulshot, Spiritshot and Blessed Spiritshot crafting in Lineage 2
  Interlude/Clásico with all 15 grades and pre-loaded recipes
- Real-time profitability computation (cristales → ore →
  crafteos → shots → cost → sale → ganancia)
- Multi-user auth with JWT in httpOnly cookie (bcrypt + RSA 2048)
- H2 file-based persistence in ./data/shots.mv.db (file-based, H2)
- Auto-save on state changes (debounced 500ms)
- Production history with stats (total/avg/best/worst/last5avg)
  and per-run detail modal with snapshot of insumos+formulas

Stack:
- Backend: Quarkus REST + Hibernate ORM Panache + smallrye-jwt
- Frontend: React 18 + TypeScript + Vite + Tailwind 3
- Build: Maven runs frontend-maven-plugin (Node 22 + npm ci)
  then copies dist to META-INF/resources for Quarkus to serve

Verified:
- 5 backend endpoints + 5 history endpoints with curl
- 35/35 browser tests via Playwright + Chromium
- All TS strict, all builds green
2026-08-12 16:03:51 -04:00