agnes-the-ai-analyst/.github/workflows/ci.yml
ZdenekSrotyr 5bbd82bacd fix: address Devin review — docker-e2e .env, jira webhook test isolation
- Create empty .env before docker compose up in CI (env_file: .env is required)
- Mock get_jira_service in webhook HMAC test to isolate signature check
  from Jira API availability — strict assert 200 instead of permissive 500
2026-04-13 14:36:31 +02:00

70 lines
1.5 KiB
YAML

name: CI
on:
push:
branches: [main, "feature/**"]
pull_request:
branches: [main]
schedule:
- cron: "0 3 * * *" # Nightly at 03:00 UTC — runs docker-e2e
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: uv pip install --system ".[dev]"
- name: Run tests (parallel)
run: pytest tests/ -v --tb=short -n auto
env:
TESTING: "1"
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Build Docker image
run: docker build -t data-analyst:test .
docker-e2e:
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
needs: docker-build
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: uv pip install --system ".[dev]"
- name: Start services
run: |
touch .env
docker compose up -d --wait --wait-timeout 60
- name: Run Docker E2E tests
run: pytest tests/ -v --tb=short -m docker --timeout=120
env:
TESTING: "1"
- name: Stop services
if: always()
run: docker compose down