Reduce CI cost: path filters, merge jobs, release-only docs #368
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
| name: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'python/**' | |
| - 'R/R/**' | |
| - 'R/tests/**' | |
| - '.github/workflows/tests.yml' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'python/**' | |
| - 'R/R/**' | |
| - 'R/tests/**' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pytest pytest-cov ruff | |
| cd python | |
| pip install -e .[dev] | |
| - name: Lint | |
| run: | | |
| cd python | |
| ruff check mllmcelltype tests | |
| - name: Test | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| GEMINI_API_KEY: ${{ secrets.GEMINI_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/ |