name: CI on: pull_request: branches: [dev] push: branches: [dev] jobs: test: runs-on: ubuntu-latest services: postgres: image: postgres:15 env: POSTGRES_USER: elemes POSTGRES_PASSWORD: elemes POSTGRES_DB: elemes_test ports: - 5432:5432 options: >- --health-cmd "pg_isready -U elemes -d elemes_test" --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/checkout@v4 - name: Set up Python 3.12 uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Run unit tests run: | PYTHONPATH=services python -m pytest -m unit -v - name: Run integration tests run: | PYTHONPATH=services DATABASE_URL="postgresql+psycopg://elemes:elemes@localhost:5432/elemes_test" python -m pytest -m integration -v - name: Run compiler worker tests run: | cd compiler_worker && PYTHONPATH=. python -m pytest -v e2e: runs-on: ubuntu-latest needs: test # E2E tests are slow — run async/post-merge or scheduled, not blocking per-PR if: github.event_name == 'schedule' || github.ref == 'refs/heads/dev' steps: - uses: actions/checkout@v4 - name: E2E smoke test run: | echo "E2E tests run on schedule or post-merge (non-blocking per-PR)" echo "See load-test/ for locust-based performance tests"