Some checks failed
AI Reviewer / review (pull_request) Failing after 25s
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
name: AI Reviewer
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
review:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:20-bookworm
|
|
|
|
steps:
|
|
- name: Install system deps + Python 3.11
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends \
|
|
git curl ca-certificates \
|
|
python3.11 python3.11-venv python3-pip
|
|
ln -sf /usr/bin/python3.11 /usr/local/bin/python
|
|
python --version
|
|
node --version
|
|
git --version
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Create venv and install project
|
|
run: |
|
|
python -m venv venv
|
|
. venv/bin/activate
|
|
pip install --upgrade pip
|
|
pip install -e ".[dev]"
|
|
|
|
- name: Wait for Ollama
|
|
run: |
|
|
for i in $(seq 1 60); do
|
|
if curl -sSf http://192.168.1.92:11434/api/tags >/dev/null 2>&1; then
|
|
echo "ollama ready" && exit 0
|
|
fi
|
|
sleep 1
|
|
done
|
|
echo "ollama not reachable" >&2
|
|
exit 1
|
|
|
|
- name: Run ai-reviewer
|
|
env:
|
|
OLLAMA_HOST: http://192.168.1.92:11434
|
|
run: |
|
|
. venv/bin/activate
|
|
ai-reviewer review \
|
|
--repo . \
|
|
--base "${{ github.event.pull_request.base.ref }}" \
|
|
--head "${{ github.head_ref }}" \
|
|
--format json > review.json
|
|
|
|
# Temporarily remove github-script; it also needs GitHub env
|
|
- name: Show result
|
|
run: |
|
|
ls -la
|
|
head -c 2000 review.json || true
|