Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 90 additions & 62 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,108 @@

name: CI/CD Pipeline

on:
push:
branches: [ main, develop ]
branches: [main, develop]
pull_request:
branches: [ main, develop ]
branches: [main, develop]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-cd-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Python Tests (${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12']

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Lint with flake8
continue-on-error: true
run: |
pip install flake8
# Stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-code is 0 even if there are warnings, for CI to pass
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Run tests with pytest
run: |
pip install pytest pytest-asyncio pytest-cov
pytest tests/ -v --cov=agents --cov=schemas --cov=utils --cov=providers --cov-report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install flake8 pytest pytest-asyncio pytest-cov

- name: Lint with flake8
continue-on-error: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Quality violations still pass CI

When a linter or type checker reports a violation, each lint and quality-check step is marked continue-on-error: true, so violations leave the workflow green and code with reported quality issues can merge without a failing check.

Remove continue-on-error: true from checks that are intended to block merges, or describe them as informational rather than enforcing quality checks.

Also at .github/workflows/ci.yml:95, .github/workflows/ci.yml:99, .github/workflows/ci.yml:103, .github/workflows/ci.yml:107.

Prompt for AI agents
In `.github/workflows/ci.yml` at line 49:

**Quality violations still pass CI**

When a linter or type checker reports a violation, each lint and quality-check step is marked `continue-on-error: true`, so violations leave the workflow green and code with reported quality issues can merge without a failing check.

Remove `continue-on-error: true` from checks that are intended to block merges, or describe them as informational rather than enforcing quality checks.

Also at `.github/workflows/ci.yml:95`, `.github/workflows/ci.yml:99`, `.github/workflows/ci.yml:103`, `.github/workflows/ci.yml:107`.

run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Run tests with pytest
run: |
pytest tests/ -v \
--cov=agents \
--cov=schemas \
--cov=utils \
--cov=providers \
--cov-report=xml

- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
fail_ci_if_error: false

code-quality:
name: Code Quality Checks
runs-on: ubuntu-latest

timeout-minutes: 15

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install black isort pylint

- name: Check code formatting with black
continue-on-error: true
run: |
black --check . || true

- name: Check import ordering with isort
continue-on-error: true
run: |
isort --check-only . || true

- name: Type checking with mypy
continue-on-error: true
run: |
pip install mypy
mypy agents providers schemas utils --ignore-missing-imports || true
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: pip
cache-dependency-path: requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install black isort pylint mypy

- name: Check code formatting with black
continue-on-error: true
run: black --check .

- name: Check import ordering with isort
continue-on-error: true
run: isort --check-only .

- name: Run pylint
continue-on-error: true
run: pylint agents providers schemas utils

- name: Type checking with mypy
continue-on-error: true
run: mypy agents providers schemas utils --ignore-missing-imports
Loading