sdk-build.yml 1.16 KB
name: SDK Build

on:
  schedule:
    - cron: '0 12 * * *'
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
  workflow_dispatch:
  
jobs:
  scheduled:
    runs-on: ubuntu-latest
    timeout-minutes: 95
    strategy:
      matrix:
        python-version: [ '3.10' ]

    services:
      redis:
        image: redis:latest
        ports:
          - 6379:6379
      rabbitmq:
        image: rabbitmq:latest
        ports:
          - 5672:5672
          - 15672:15672

    steps:
      - name: Checkout branch
        uses: actions/checkout@v2
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install pytest dependencies
        run: |
          python -m pip install --upgrade pip
          pip install pytest
          pip install pytest-asyncio
      - name: Change directory and install sdk dependencies
        run: |
          cd ./protollm_tools/sdk
          pip install -r requirements.txt
          pip install -e .
      - name: Test sdk with pytest
        run: |
          cd ./protollm_tools/sdk
          pytest -s ./tests -m ci