Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 32 additions & 11 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
node_modules/
dist/
dist.bak.*/
frontend.pid
frontend.node.pid
frontend.log
frontend.tar.gz
.git/
.github/
.env
.env.*
# Build context is the repo root (the project itself). Exclude everything the
# image builds don't need, to speed up builds and avoid baking in secrets.
# NOTE: do NOT exclude docker/ or script-service/ - the Dockerfiles reference them.

# VCS
.git
.gitignore

# Deps & build artifacts (regenerated inside the image)
**/node_modules
**/dist
**/.svelte-kit

# Tests, e2e, local runtime data - not needed in the runtime image
test
e2e
test-results
data
# Full-stack compose runtime data/config (self-contained under docker/)
docker/data
docker/agent-compose.env

# Test files anywhere
**/*.test.*
**/*.spec.*

# Secrets - never bake into images (mounted as volumes at runtime instead)
**/.env
**/.env.*

# Misc
**/.DS_Store
44 changes: 38 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,49 @@ jobs:
build:
name: Test and build
runs-on: ubuntu-latest
env:
# The UI formats run timestamps in local time and the component tests
# assert against UTC+8 values (the project's zh-CN target locale). Run the
# suite in Asia/Shanghai so the runner's default UTC doesn't trip them.
TZ: Asia/Shanghai
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- uses: actions/setup-go@v5

# bun:test drives the .test.js/.test.mjs unit suite and the e2e unit tests.
# Pinned to 1.x to match the oven/bun:1-alpine base used by the scripts image.
- uses: oven-sh/setup-bun@v2
with:
go-version-file: go.mod
cache: true
bun-version: 1

- run: npm ci
- run: go test ./...
- run: npm run build:ui
- run: docker build -f nginx/Dockerfile -t agent-compose-ui:test .

- name: Verify generated protobuf is up to date
run: |
npm run gen
git diff --exit-code -- src/gen

- name: Type check
run: npm run check

- name: Unit tests
run: npm test

- name: E2E unit tests
run: npm run test:e2e:unit

- name: Component tests
run: npm run test:component

- name: Build SPA
run: npm run build

- name: Build web image
run: docker build -f docker/Dockerfile.web -t agent-compose-web:ci .

- name: Build scripts image
run: docker build -f docker/Dockerfile.scripts -t agent-compose-scripts:ci .
21 changes: 15 additions & 6 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ concurrency:
group: image-${{ github.ref }}
cancel-in-progress: false

env:
IMAGE: ghcr.io/${{ github.repository_owner }}/agent-compose-ui

jobs:
image:
name: Build and push UI image
name: Build and push ${{ matrix.suffix }} image
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# The deployable stack (docker/docker-compose*.yml) builds both images;
# publish them so deployments can pull instead of building locally.
include:
- dockerfile: docker/Dockerfile.web
suffix: agent-compose-ui
- dockerfile: docker/Dockerfile.scripts
suffix: agent-compose-scripts
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
Expand All @@ -32,7 +39,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
images: ghcr.io/${{ github.repository_owner }}/${{ matrix.suffix }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
Expand All @@ -50,8 +57,10 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
file: nginx/Dockerfile
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ matrix.suffix }}
cache-to: type=gha,scope=${{ matrix.suffix }},mode=max
33 changes: 8 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,11 @@
# Dependencies
.superpowers/
node_modules/

# Build output
dist/
dist.bak.*/
frontend.tar.gz
frontend.pid
frontend.node.pid

# Vite / Svelte caches
.vite/
.svelte-kit/

# Local env
/data/scripts/
/e2e/reports/
.env
.env.*
!.env.example

# Logs
*.log
npm-debug.log*

# OS / editor
.DS_Store
Thumbs.db
*.swp
.idea/
test-results/
docker/.env
# Full-stack compose runtime data/config (self-contained under docker/)
docker/data/
docker/agent-compose.env
43 changes: 0 additions & 43 deletions AGENTS.md

This file was deleted.

Loading
Loading