Skip to content

refactor(simplebot): use default language model from config #313

refactor(simplebot): use default language model from config

refactor(simplebot): use default language model from config #313

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 }}, ${{ matrix.environment-type }})
strategy:
matrix:
python-version: [3.11]
environment-type: ['miniconda', 'bare']
# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python environment
if: matrix.environment-type == 'bare'
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# See: https://github.com/marketplace/actions/setup-miniconda
- name: Setup miniconda
if: matrix.environment-type == 'miniconda'
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniforge-variant: Mambaforge
channels: conda-forge
activate-environment: llamabot
environment-file: environment.yml
use-mamba: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: matrix.environment-type == 'bare'
# 17 June 2023: Figure out a way to move testing deps to the `pip install -e .` step below.
run: |
python -m pip install -e ".[all]"
- name: Run tests
run: |
if [ "${{ matrix.environment-type }}" == "miniconda" ]; then
conda activate llamabot
fi
pip install -e ".[all]"
pytest
- name: Test CLI
run: |
pip install -e ".[all]"
llamabot --help
# https://github.com/codecov/codecov-action
- name: Upload code coverage
uses: codecov/codecov-action@v2
with:
# fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)