Skip to content

improved metrics

improved metrics #5

Workflow file for this run

"""GitHub Actions CI/CD configuration."""

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 1, Col: 1): Unexpected value ''
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.0
- name: Install dependencies
run: |
poetry install --no-interaction
- name: Run ruff
run: |
poetry run ruff check .
- name: Run mypy
run: |
poetry run mypy . --ignore-missing-imports
test:
runs-on: ubuntu-latest
strategy:
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 Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.0
- name: Install dependencies
run: |
poetry install --no-interaction
- name: Run tests
run: |
poetry run pytest -v --cov=. --cov-report=xml
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false
integration:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.0
- name: Install dependencies
run: |
poetry install --no-interaction --with tools
- name: Install analysis tools
run: |
pip install semgrep bandit
- name: Run integration tests
run: |
poetry run pytest tests/e2e/ -v
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}