chore: fix git actions
This commit is contained in:
@@ -29,13 +29,12 @@ If applicable, add screenshots to help explain your problem.
|
|||||||
## Environment
|
## Environment
|
||||||
|
|
||||||
- OS: [e.g., Ubuntu 22.04, macOS 14]
|
- OS: [e.g., Ubuntu 22.04, macOS 14]
|
||||||
- Docker version: [e.g., 24.0.0]
|
- Python version: [e.g., 3.11.0]
|
||||||
- Node version: [e.g., 20.10.0]
|
- Docker version (if applicable): [e.g., 24.0.0]
|
||||||
- Browser (if applicable): [e.g., Chrome 120]
|
|
||||||
|
|
||||||
## Configuration
|
## 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
|
```yaml
|
||||||
# paste here
|
# paste here
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ Fixes #(issue number)
|
|||||||
|
|
||||||
Describe the tests you ran to verify your changes:
|
Describe the tests you ran to verify your changes:
|
||||||
|
|
||||||
- [ ] Unit tests pass (`npm run test`)
|
- [ ] Unit tests pass (`cd core && pytest tests/`)
|
||||||
- [ ] Lint passes (`npm run lint`)
|
- [ ] Lint passes (`cd core && ruff check .`)
|
||||||
- [ ] Manual testing performed
|
- [ ] Manual testing performed
|
||||||
|
|
||||||
## Checklist
|
## Checklist
|
||||||
|
|||||||
+44
-52
@@ -12,84 +12,76 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint
|
name: Lint Python
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Python
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
python-version: '3.11'
|
||||||
cache: 'npm'
|
cache: 'pip'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: |
|
||||||
|
cd core
|
||||||
|
pip install -e .
|
||||||
|
pip install -r requirements-dev.txt
|
||||||
|
|
||||||
- name: Run linter
|
- name: Run ruff
|
||||||
run: npm run lint
|
run: |
|
||||||
|
cd core
|
||||||
|
ruff check .
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test Python Framework
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Python
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
python-version: '3.11'
|
||||||
cache: 'npm'
|
cache: 'pip'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: |
|
||||||
|
cd core
|
||||||
|
pip install -e .
|
||||||
|
pip install -r requirements-dev.txt
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: npm run test
|
run: |
|
||||||
|
cd core
|
||||||
|
pytest tests/ -v
|
||||||
|
|
||||||
build:
|
validate:
|
||||||
name: Build
|
name: Validate Agent Exports
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [lint, test]
|
needs: [lint, test]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Python
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
python-version: '3.11'
|
||||||
cache: 'npm'
|
cache: 'pip'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: |
|
||||||
|
cd core
|
||||||
|
pip install -e .
|
||||||
|
pip install -r requirements-dev.txt
|
||||||
|
|
||||||
- name: Build packages
|
- name: Validate exported agents
|
||||||
run: npm run build
|
run: |
|
||||||
|
# Check that agent exports have valid structure
|
||||||
docker:
|
for agent_dir in exports/*/; do
|
||||||
name: Docker Build
|
if [ -f "$agent_dir/agent.json" ]; then
|
||||||
runs-on: ubuntu-latest
|
echo "Validating $agent_dir"
|
||||||
needs: [lint, test]
|
python -c "import json; json.load(open('$agent_dir/agent.json'))"
|
||||||
steps:
|
fi
|
||||||
- uses: actions/checkout@v4
|
done
|
||||||
|
|
||||||
- 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
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@@ -18,20 +17,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Python
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
python-version: '3.11'
|
||||||
cache: 'npm'
|
cache: 'pip'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: |
|
||||||
|
cd core
|
||||||
- name: Build packages
|
pip install -e .
|
||||||
run: npm run build
|
pip install -r requirements-dev.txt
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: npm run test
|
run: |
|
||||||
|
cd core
|
||||||
|
pytest tests/ -v
|
||||||
|
|
||||||
- name: Generate changelog
|
- name: Generate changelog
|
||||||
id: changelog
|
id: changelog
|
||||||
@@ -46,50 +47,3 @@ jobs:
|
|||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: ${{ contains(github.ref, '-') }}
|
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
@@ -2,25 +2,14 @@
|
|||||||
"name": "hive",
|
"name": "hive",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Hive - AI agent observability and control platform",
|
"description": "Hive - Aden Agent Framework - Build goal-driven, self-improving AI agents",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/adenhq/hive.git"
|
"url": "https://github.com/adenhq/hive.git"
|
||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"workspaces": [
|
|
||||||
"honeycomb",
|
|
||||||
"hive"
|
|
||||||
],
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "docker compose up",
|
"setup": "echo '⚠️ This npm setup is for the archived web application. For agent development, use: ./scripts/setup-python.sh' && bash scripts/setup.sh"
|
||||||
"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"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.10.0",
|
"@types/node": "^20.10.0",
|
||||||
@@ -33,4 +22,4 @@
|
|||||||
"npm": ">=10.0.0"
|
"npm": ">=10.0.0"
|
||||||
},
|
},
|
||||||
"packageManager": "npm@10.2.0"
|
"packageManager": "npm@10.2.0"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user