Files
investor-flow/.github/workflows/ci.yml
T
Investor Flow Build 90e1829d39
CI / Test (push) Canceled after 0s
CI / Build and push (push) Canceled after 0s
feat: Unraid deploy, dealer-flow heatmap, confluence zones, 13F capture
Ship Node production images, Unraid compose, and Gitea CI/CD (test then
push registry images; cron script if no runner). Rebuild dealer flow as a
heatmap-first map with integrity gates and chart helpers. Add confluence
zone rules, session clock, capture evidence, and tighter 13F/queue/options
paths, plus the matching UI and tests.
2026-08-18 14:10:02 -04:00

110 lines
3.3 KiB
YAML

# Gitea Actions (GitHub-compatible). Tests on every PR / push.
# On push to main, also builds and pushes images to the Gitea registry.
#
# Requires a registered act_runner labeled ubuntu-latest. Without a runner
# Gitea marks the run cancelled. See deploy/unraid/act-runner-compose.yml.
#
# Repo secret REGISTRY_TOKEN: Gitea token with write:package + write:repository.
# Optional var REGISTRY: default 10.37.0.86:3003 (HTTP; mark insecure in Docker).
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: |
app/package-lock.json
app/server/package-lock.json
- name: Install frontend
working-directory: app
run: npm ci
- name: Install backend
working-directory: app/server
run: npm ci
- name: Frontend tests
working-directory: app
run: node --test --experimental-strip-types "src/**/*.test.ts"
env:
NODE_ENV: development
- name: Backend tests
working-directory: app/server
run: npm test
env:
NODE_ENV: development
- name: Backend typecheck
working-directory: app/server
run: npm run typecheck
images:
name: Build and push
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
env:
REGISTRY: ${{ vars.REGISTRY || '10.37.0.86:3003' }}
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
config-inline: |
[registry."10.37.0.86:3003"]
http = true
insecure = true
[registry."unraid.local:3003"]
http = true
insecure = true
- name: Log in to Gitea registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_TOKEN || github.token }}
- name: Backend image
uses: docker/build-push-action@v6
with:
context: ./app/server
file: ./app/server/Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/transnet/investor-flow-backend:${{ github.sha }}
${{ env.REGISTRY }}/transnet/investor-flow-backend:latest
cache-from: type=registry,ref=${{ env.REGISTRY }}/transnet/investor-flow-backend:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/transnet/investor-flow-backend:buildcache,mode=max
- name: Frontend image
uses: docker/build-push-action@v6
with:
context: ./app
file: ./app/Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/transnet/investor-flow-frontend:${{ github.sha }}
${{ env.REGISTRY }}/transnet/investor-flow-frontend:latest
cache-from: type=registry,ref=${{ env.REGISTRY }}/transnet/investor-flow-frontend:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/transnet/investor-flow-frontend:buildcache,mode=max