Skip to content

ci(docs)📝: Update GitHub Actions workflow for documentation #1001

ci(docs)📝: Update GitHub Actions workflow for documentation

ci(docs)📝: Update GitHub Actions workflow for documentation #1001

Workflow file for this run

name: Run tests on pull requests
on:
pull_request:
branches: [main]
push:
branches: [main]
env:
OPENAI_API_KEY: dummy_key
jobs:
run-tests:
runs-on: ubuntu-latest
name: Run test suite (Python ${{ matrix.python-version }})
strategy:
matrix:
python-version: [3.11, 3.12]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update apt and install curl
run: |
sudo apt-get update
sudo apt-get install -y curl
- name: Download Ollama installation script
run: curl -fsSL https://ollama.com/install.sh -o install.sh
- name: Run Ollama installation script
run: bash install.sh
- name: Setup Pixi Environment
uses: prefix-dev/[email protected]
with:
pixi-version: latest
cache: true
cache-write: ${{ github.event_name == 'push' }}
- name: Run tests (pixi)
run: |
pixi run test
# https://github.com/codecov/codecov-action
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
# fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
smoke-tests:
runs-on: ubuntu-latest
name: Run smoke tests (Python ${{ matrix.python-version }})
strategy:
matrix:
python-version: [3.11, 3.12]
environment-type: ['pixi', 'bare']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Pixi Environment
uses: prefix-dev/[email protected]
if: ${{ matrix.environment-type == 'pixi' }}
with:
pixi-version: latest
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
- name: Setup uv
# Install latest uv version using the installer
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Set up Python
run: uv venv llamabot-env --python ${{ matrix.python-version }}
if: ${{ matrix.environment-type == 'bare' }}
- name: Test CLI (pixi)
if: matrix.environment-type == 'pixi' && github.repository_owner == 'ericmjl'
run: |
pixi run llamabot-cli
- name: Test CLI (bare)
if: matrix.environment-type == 'bare' && github.repository_owner == 'ericmjl'
run: |
source llamabot-env/bin/activate
uv pip install .
llamabot --help