Skip to content

Replace Chinese comments with English equivalents in test files #27

Replace Chinese comments with English equivalents in test files

Replace Chinese comments with English equivalents in test files #27

Workflow file for this run

name: Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch: # Allows manual triggering
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
cd python
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .[dev]
- name: Test with pytest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
QWEN_API_KEY: ${{ secrets.QWEN_API_KEY }}
STEPFUN_API_KEY: ${{ secrets.STEPFUN_API_KEY }}
ZHIPU_API_KEY: ${{ secrets.ZHIPU_API_KEY }}
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
run: |
cd python
pytest --cov=mllmcelltype tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./python/coverage.xml
fail_ci_if_error: false
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 black isort
- name: Lint with flake8
run: |
cd python
flake8 mllmcelltype tests --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Check formatting with black
run: |
cd python
black --check mllmcelltype tests
- name: Check imports with isort
run: |
cd python
isort --check-only --profile black mllmcelltype tests