Skip to content

Commit 321ef29

Browse files
cucumberfalseMikhail Orlov
andauthored
[codex] Implement MVP runtime trainer (#5)
* Implement MVP runtime trainer * Address MVP runtime review findings * Tighten non-B source validation * Address MVP runtime review follow-ups --------- Co-authored-by: Mikhail Orlov <mikhail.orlov@my.games>
1 parent 06b8582 commit 321ef29

332 files changed

Lines changed: 32482 additions & 14 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
dist
3+
public/content
4+
playwright-report
5+
test-results
6+
.git
7+
.DS_Store

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
content/assets/** binary
2+
content/sources/originals/** binary

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,38 @@ jobs:
6060

6161
- name: Run build if present
6262
run: pnpm run --if-present build
63+
64+
- name: Install Playwright browser
65+
run: pnpm exec playwright install --with-deps chromium
66+
67+
- name: Run browser smoke tests if present
68+
run: pnpm run --if-present test:e2e
69+
70+
docker-validation:
71+
name: docker-validation
72+
runs-on: ubuntu-latest
73+
steps:
74+
- name: Checkout
75+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
76+
77+
- name: Build Docker image
78+
run: make build
79+
80+
- name: Start Docker app
81+
run: make up
82+
83+
- name: Smoke test local app
84+
run: |
85+
set -euo pipefail
86+
for attempt in $(seq 1 30); do
87+
if curl --fail --silent --show-error http://localhost:5173/ >/tmp/cabadrive-home.html; then
88+
break
89+
fi
90+
sleep 1
91+
done
92+
grep -q "Cabadrive" /tmp/cabadrive-home.html
93+
curl --fail --silent --show-error http://localhost:5173/sw.js >/dev/null
94+
95+
- name: Stop Docker app
96+
if: always()
97+
run: make down

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/
2+
dist/
3+
coverage/
4+
public/content/
5+
playwright-report/
6+
test-results/
7+
.DS_Store

.unicorn-hub/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
],
1515
"requiredChecks": [
1616
"baseline-checks",
17+
"docker-validation",
1718
"guard",
1819
"AI Review",
1920
"osv-scan"

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:22-alpine AS build
2+
3+
WORKDIR /app
4+
RUN corepack enable
5+
6+
COPY package.json pnpm-workspace.yaml ./
7+
COPY pnpm-lock.yaml* ./
8+
RUN if [ -f pnpm-lock.yaml ]; then pnpm install --frozen-lockfile; else pnpm install --no-frozen-lockfile; fi
9+
10+
COPY . .
11+
RUN pnpm run build
12+
13+
FROM nginx:1.29-alpine AS runtime
14+
15+
COPY nginx.conf /etc/nginx/conf.d/default.conf
16+
COPY --from=build /app/dist /usr/share/nginx/html
17+
18+
EXPOSE 8080
19+
20+
CMD ["nginx", "-g", "daemon off;"]

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.PHONY: build up down logs
2+
3+
build:
4+
docker compose build
5+
6+
up:
7+
docker compose up -d
8+
@echo "Cabadrive is available at http://localhost:5173"
9+
10+
down:
11+
docker compose down
12+
13+
logs:
14+
docker compose logs -f cabadrive
95.4 KB
51.7 KB
55.4 KB

0 commit comments

Comments
 (0)