• ilyushka's avatar
    build: Update unit test action (#29) · 17b5b58d
    ilyushka authored
    * Update unit-build.yml
    
    * Create __init__.py
    
    * fix unit-build.yml
    
    * fix: Rename branch from master to main to trigger the action
    
    * chore: Change name for llm-api actions
    17b5b58d
unit-build.yml 1.17 KB
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Unit Build

on:
  push:
    branches: [ main, release ]
  pull_request:
    branches: [ main, release ]
  workflow_dispatch:  # manually launch from GitHub actions

jobs:
  build:

    runs-on: ubuntu-latest
    timeout-minutes: 15
    strategy:
      matrix:
        python-version: [ '3.10' ]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install pytest
        pip install .
    - name: Test with pytest
      run: |
        pytest -s tests
    - name: Install llm-api dependencies
      run: |
        pip install pytest-asyncio
        pip install -r ./protollm_tools/llm-api/requirements.txt
    - name: Test llm-api with pytest
      run: |
        pytest -s ./protollm_tools/llm-api/tests/unit