Skip to content

Fix packaging path for GitHub Actions #2

Fix packaging path for GitHub Actions

Fix packaging path for GitHub Actions #2

Workflow file for this run

name: validate
on:
push:
branches: [master, main]
tags: ['v*']
pull_request:
jobs:
helper-scripts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Run helper unit tests
run: python3 -m unittest discover -s tests -v
- name: Generate kickoff plan
run: |
python3 openclaw-fullstack-dev/scripts/generate_fullstack_plan.py \
"Build an internal feedback tracker with Next.js, FastAPI, and PostgreSQL" \
--frontend nextjs --backend fastapi --db postgres > /tmp/plan.md
test -s /tmp/plan.md
- name: Copy and verify starter templates
run: |
python3 openclaw-fullstack-dev/scripts/copy_starter_template.py --list
for template in nextjs-fastapi-starter react-express-starter nextjs-nestjs-starter; do
dest="/tmp/${template}"
python3 openclaw-fullstack-dev/scripts/copy_starter_template.py "$template" "$dest"
python3 openclaw-fullstack-dev/scripts/verify_starter_template.py "$template" "$dest"
done
- name: Install OpenClaw for packaging
run: npm install -g openclaw
- name: Package distributable skill
run: |
OPENCLAW_ROOT="$(npm root -g)/openclaw"
python3 "$OPENCLAW_ROOT/skills/skill-creator/scripts/package_skill.py" ./openclaw-fullstack-dev ./dist
test -f ./dist/openclaw-fullstack-dev.skill
starter-smoke:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
starter: [nextjs-fastapi-starter, react-express-starter, nextjs-nestjs-starter]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Set up Python
if: matrix.starter == 'nextjs-fastapi-starter'
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install client deps
working-directory: openclaw-fullstack-dev/assets/${{ matrix.starter }}/client
run: npm ci
- name: Build client
working-directory: openclaw-fullstack-dev/assets/${{ matrix.starter }}/client
run: npm run build
- name: Install, build, and smoke-test FastAPI server
if: matrix.starter == 'nextjs-fastapi-starter'
working-directory: openclaw-fullstack-dev/assets/nextjs-fastapi-starter/server
run: |
set -euo pipefail
pip install -r requirements.txt
python3 -m uvicorn app.main:app --host 127.0.0.1 --port 8000 >/tmp/next-fastapi-server.log 2>&1 &
SERVER_PID=$!
trap 'kill ${SERVER_PID}' EXIT
for _ in $(seq 1 20); do
if curl --fail --silent http://127.0.0.1:8000/health >/tmp/next-fastapi-health.json; then
break
fi
sleep 1
done
grep '"ok":true' /tmp/next-fastapi-health.json
- name: Install, build, and smoke-test Express server
if: matrix.starter == 'react-express-starter'
working-directory: openclaw-fullstack-dev/assets/react-express-starter/server
run: |
set -euo pipefail
npm ci
npm run build
node dist/index.js >/tmp/react-express-server.log 2>&1 &
SERVER_PID=$!
trap 'kill ${SERVER_PID}' EXIT
for _ in $(seq 1 20); do
if curl --fail --silent http://127.0.0.1:3001/health >/tmp/react-express-health.json; then
break
fi
sleep 1
done
grep '"ok":true' /tmp/react-express-health.json
- name: Install, build, and smoke-test NestJS server
if: matrix.starter == 'nextjs-nestjs-starter'
working-directory: openclaw-fullstack-dev/assets/nextjs-nestjs-starter/server
run: |
set -euo pipefail
npm ci
npm run build
node dist/main.js >/tmp/next-nest-server.log 2>&1 &
SERVER_PID=$!
trap 'kill ${SERVER_PID}' EXIT
for _ in $(seq 1 20); do
if curl --fail --silent http://127.0.0.1:3001/health >/tmp/next-nest-health.json; then
break
fi
sleep 1
done
grep '"ok":true' /tmp/next-nest-health.json