Add Python TrainSim with loop track map and physics.
Some checks are pending
CodeView TrainSim CI / test (push) Waiting to run
CodeView TrainSim CI / docker (push) Blocked by required conditions

FastAPI server, replaceable JSON config, tests, Dockerfile.
Pairs with ATO via spec/interface.md contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Mona Lisa 2026-06-14 20:37:22 +00:00
parent 45c95836ef
commit 9c5ef3a5cd
18 changed files with 414 additions and 18 deletions

View file

@ -1,4 +1,4 @@
name: CodeView CI
name: CodeView TrainSim CI
on:
push:
@ -7,28 +7,21 @@ on:
branches: [main]
jobs:
lint:
test:
runs-on: docker
container:
image: python:3.12-slim
steps:
- uses: actions/checkout@v4
- name: Lint
- name: Pytest
run: |
if [ -f package.json ]; then npm ci && npm run lint; else echo "no lint configured"; fi
pip install -r requirements.txt
pytest -q
tests:
docker:
runs-on: docker
needs: lint
steps:
- uses: actions/checkout@v4
- name: Unit tests
run: |
if [ -f package.json ]; then npm test; elif [ -f pyproject.toml ]; then pip install -e . && pytest; else echo "no tests configured"; fi
docker-build:
runs-on: docker
needs: tests
needs: test
steps:
- uses: actions/checkout@v4
- name: Docker build
run: |
if [ -f Dockerfile ]; then docker build -t app:ci .; elif [ -f docker-compose.yml ]; then docker compose build; else echo "no docker build configured"; fi
run: docker build -t trainsim:ci .