* make tests dummy to make sure github workflow is fine * black test * strip circular import * further dummy-fy the test * use pexpect * need y * Update tests.yml * Update tests.yml * added prints * sleep before decode print * updated test to match legacy flow * revising test where it fails * comment out enter your message check for now, pexpect seems to be stuck on only setting the bootup message * weird now it's not showing Bootup sequence complete? * added debug * handle none * allow more time * loosen string check * add enter after commands * modify saved compontent snippet * add try again check * more sendlines * more excepts * test passing locally * Update tests.yml * dont clearline * add EOF catch that seems to only happen on github actiosn (ubuntu) but not macos * more eof * try flushing * add strip_ui flag * fix archival_memory_search and memory print output * Don't use questionary for input if strip_ui * Run black * Always strip UI if TEST is set * Add another flush * expect Enter your message * more debug prints * one more shot at printing debug info * stray fore color in stripped ui * tests pass locally * cleanup --------- Co-authored-by: Vivian Fang <hi@vivi.sh>
37 lines
668 B
YAML
37 lines
668 B
YAML
name: MemGPT tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.10.10 # Set this to your Python version
|
|
|
|
- name: Install Poetry
|
|
run: |
|
|
pip install poetry
|
|
|
|
- name: Install dependencies using Poetry
|
|
run: |
|
|
poetry install
|
|
|
|
- name: Install pexpect for testing the interactive CLI
|
|
run: |
|
|
poetry add --dev pexpect
|
|
|
|
- name: Run tests with pytest
|
|
run: |
|
|
poetry run pytest -s -vv tests
|