Repository navigation
Upgrade CI/CD workflow to use latest actions #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jeniferalaquoke
wants to merge
1
commit into
DevSidd2006:main
Choose a base branch
from
jeniferalaquoke:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| 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 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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: truefrom 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