Skip to content

feat: add GitHub badges and CI/CD workflow #1

feat: add GitHub badges and CI/CD workflow

feat: add GitHub badges and CI/CD workflow #1

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov pytest-asyncio
- name: Lint with ruff
run: |
pip install ruff
ruff check src/ tests/
- name: Format check with black
run: |
pip install black
black --check src/ tests/
- name: Type check with mypy
run: |
pip install mypy
mypy src/ || true
- name: Run tests
run: |
pytest tests/ -v --cov=src --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t aec-rag-system:test .
- name: Test Docker image
run: |
docker run --rm aec-rag-system:test python --version