ai / .github /workflows /ci.yml
3v324v23's picture
agent
ee9a09c
Raw
History Blame Contribute Delete
1.24 kB
name: CI
on:
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]
workflow_dispatch:
jobs:
python:
name: Python checks
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"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Compile Python
run: python -m compileall backend scripts
- name: Run tests
run: |
if [ -d tests ] && find tests -name "test_*.py" | grep -q .; then
python -m pytest
else
echo "No tests found yet."
fi
docker:
name: Docker builds
runs-on: ubuntu-latest
needs: python
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build backend image
run: docker build -f backend/Dockerfile -t codebase-agent-backend:ci .
- name: Build frontend image
run: docker build -f frontend/Dockerfile -t codebase-agent-frontend:ci .