* fix: resolve Docker build syntax errors and merge conflicts
- Fix incomplete ARG HuggingFace declaration to ARG HuggingFace_API_KEY
- Fix invalid WORKDIR variable reference ${WORKDIR}/run to /app/run
- Resolve merge conflicts preserving both runtime and development stages
- Add proper development stage with corrected environment variables
- Ensure both dockerbuild and dockerbuild:prod targets work correctly
Resolves Docker build error: "target stage 'bolt-ai-development' could not be found"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* ci: add comprehensive Docker build validation to main CI pipeline
- Add docker-validation job to ci.yaml workflow
- Test both runtime (production) and development Docker targets
- Validate docker-compose configuration syntax
- Run on all PRs and pushes to catch Docker build issues early
- Set 15-minute timeout to prevent hanging builds
- Use --no-cache and --progress=plain for reliable validation
This ensures Docker build syntax errors like #1996 are caught in CI
before they reach main branch, preventing deployment failures.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: use modern docker compose command syntax in CI
- Change docker-compose to docker compose (GitHub Actions uses Docker Compose v2)
- Fixes CI failure: docker-compose: command not found
- Ensures docker-compose validation works in GitHub Actions runners
---------
Co-authored-by: Claude <noreply@anthropic.com>
91 lines
2.4 KiB
YAML
91 lines
2.4 KiB
YAML
name: CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
# Cancel in-progress runs on the same branch/PR
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup and Build
|
|
uses: ./.github/actions/setup-and-build
|
|
|
|
- name: Cache TypeScript compilation
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
.tsbuildinfo
|
|
node_modules/.cache
|
|
key: ${{ runner.os }}-typescript-${{ hashFiles('**/tsconfig.json', 'app/**/*.ts', 'app/**/*.tsx') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-typescript-
|
|
|
|
- name: Run type check
|
|
run: pnpm run typecheck
|
|
|
|
- name: Cache ESLint
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: node_modules/.cache/eslint
|
|
key: ${{ runner.os }}-eslint-${{ hashFiles('.eslintrc*', 'app/**/*.ts', 'app/**/*.tsx') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-eslint-
|
|
|
|
- name: Run ESLint
|
|
run: pnpm run lint
|
|
|
|
- name: Run tests
|
|
run: pnpm run test
|
|
|
|
- name: Upload test coverage
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: coverage-report
|
|
path: coverage/
|
|
retention-days: 7
|
|
|
|
docker-validation:
|
|
name: Docker Build Validation
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Validate Docker production build
|
|
run: |
|
|
echo "🐳 Testing Docker production target..."
|
|
docker build --target runtime . --no-cache --progress=plain
|
|
echo "✅ Production target builds successfully"
|
|
|
|
- name: Validate Docker development build
|
|
run: |
|
|
echo "🐳 Testing Docker development target..."
|
|
docker build --target development . --no-cache --progress=plain
|
|
echo "✅ Development target builds successfully"
|
|
|
|
- name: Validate docker-compose configuration
|
|
run: |
|
|
echo "🐳 Validating docker-compose configuration..."
|
|
docker compose config --quiet
|
|
echo "✅ docker-compose configuration is valid"
|