chore: fix git actions

This commit is contained in:
Timothy
2026-01-22 11:04:26 -08:00
parent 6aaa78c8d3
commit f5e887939c
5 changed files with 63 additions and 129 deletions
+3 -4
View File
@@ -29,13 +29,12 @@ If applicable, add screenshots to help explain your problem.
## Environment
- OS: [e.g., Ubuntu 22.04, macOS 14]
- Docker version: [e.g., 24.0.0]
- Node version: [e.g., 20.10.0]
- Browser (if applicable): [e.g., Chrome 120]
- Python version: [e.g., 3.11.0]
- Docker version (if applicable): [e.g., 24.0.0]
## Configuration
Relevant parts of your `config.yaml` (remove any sensitive data):
Relevant parts of your agent configuration or environment setup (remove any sensitive data):
```yaml
# paste here
+2 -2
View File
@@ -24,8 +24,8 @@ Fixes #(issue number)
Describe the tests you ran to verify your changes:
- [ ] Unit tests pass (`npm run test`)
- [ ] Lint passes (`npm run lint`)
- [ ] Unit tests pass (`cd core && pytest tests/`)
- [ ] Lint passes (`cd core && ruff check .`)
- [ ] Manual testing performed
## Checklist
+44 -52
View File
@@ -12,84 +12,76 @@ concurrency:
jobs:
lint:
name: Lint
name: Lint Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
node-version: '20'
cache: 'npm'
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: npm ci
run: |
cd core
pip install -e .
pip install -r requirements-dev.txt
- name: Run linter
run: npm run lint
- name: Run ruff
run: |
cd core
ruff check .
test:
name: Test
name: Test Python Framework
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
node-version: '20'
cache: 'npm'
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: npm ci
run: |
cd core
pip install -e .
pip install -r requirements-dev.txt
- name: Run tests
run: npm run test
run: |
cd core
pytest tests/ -v
build:
name: Build
validate:
name: Validate Agent Exports
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
node-version: '20'
cache: 'npm'
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: npm ci
run: |
cd core
pip install -e .
pip install -r requirements-dev.txt
- name: Build packages
run: npm run build
docker:
name: Docker Build
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build frontend image
uses: docker/build-push-action@v5
with:
context: ./honeycomb
push: false
tags: honeycomb-frontend:test
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build backend image
uses: docker/build-push-action@v5
with:
context: ./hive
push: false
tags: honeycomb-backend:test
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Validate exported agents
run: |
# Check that agent exports have valid structure
for agent_dir in exports/*/; do
if [ -f "$agent_dir/agent.json" ]; then
echo "Validating $agent_dir"
python -c "import json; json.load(open('$agent_dir/agent.json'))"
fi
done
+11 -57
View File
@@ -7,7 +7,6 @@ on:
permissions:
contents: write
packages: write
jobs:
release:
@@ -18,20 +17,22 @@ jobs:
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
node-version: '20'
cache: 'npm'
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: npm ci
- name: Build packages
run: npm run build
run: |
cd core
pip install -e .
pip install -r requirements-dev.txt
- name: Run tests
run: npm run test
run: |
cd core
pytest tests/ -v
- name: Generate changelog
id: changelog
@@ -46,50 +47,3 @@ jobs:
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref, '-') }}
docker-publish:
name: Publish Docker Images
runs-on: ubuntu-latest
needs: release
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}/frontend
ghcr.io/${{ github.repository }}/backend
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push frontend
uses: docker/build-push-action@v5
with:
context: ./honeycomb
push: true
tags: ghcr.io/${{ github.repository }}/frontend:${{ github.ref_name }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push backend
uses: docker/build-push-action@v5
with:
context: ./hive
push: true
tags: ghcr.io/${{ github.repository }}/backend:${{ github.ref_name }}
cache-from: type=gha
cache-to: type=gha,mode=max
+3 -14
View File
@@ -2,25 +2,14 @@
"name": "hive",
"version": "0.1.0",
"private": true,
"description": "Hive - AI agent observability and control platform",
"description": "Hive - Aden Agent Framework - Build goal-driven, self-improving AI agents",
"repository": {
"type": "git",
"url": "https://github.com/adenhq/hive.git"
},
"license": "Apache-2.0",
"workspaces": [
"honeycomb",
"hive"
],
"scripts": {
"dev": "docker compose up",
"dev:build": "docker compose up --build",
"build": "npm run build --workspaces",
"lint": "npm run lint --workspaces",
"test": "npm run test --workspaces",
"setup": "bash scripts/setup.sh",
"generate:env": "npx tsx scripts/generate-env.ts",
"clean": "npm run clean --workspaces && rm -rf node_modules"
"setup": "echo '⚠️ This npm setup is for the archived web application. For agent development, use: ./scripts/setup-python.sh' && bash scripts/setup.sh"
},
"devDependencies": {
"@types/node": "^20.10.0",
@@ -33,4 +22,4 @@
"npm": ">=10.0.0"
},
"packageManager": "npm@10.2.0"
}
}