-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from dbpunk-labs/90-unable-to-download-llama
add matrix test environment
- Loading branch information
Showing
6 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Python Project | ||
name: backend testing | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Cli Testing | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.10", "3.11"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
- name: Run cli tests | ||
shell: bash | ||
run: | | ||
cd up | ||
pip install . | ||
pytest tests/*.py | ||
cd ../chat | ||
pip install . | ||
pytest tests/*.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#! /usr/bin/env python3 | ||
# vim:fenc=utf-8 | ||
# | ||
# Copyright © 2023 imotai <imotai@imotai-ub> | ||
# | ||
# Distributed under terms of the MIT license. | ||
|
||
""" | ||
""" | ||
|
||
from og_terminal.utils import parse_file_path | ||
|
||
|
||
def test_parse_file_path(): | ||
prompt = "convert the file /up /home/test.pdf to text" | ||
paths = parse_file_path(prompt) | ||
assert len(paths) == 1, "bad file path count" | ||
assert paths[0] == '/home/test.pdf', "bad file path " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#! /usr/bin/env python3 | ||
# vim:fenc=utf-8 | ||
# | ||
# Copyright © 2023 imotai <imotai@imotai-ub> | ||
# | ||
# Distributed under terms of the MIT license. | ||
|
||
""" | ||
""" | ||
|
||
import os | ||
from og_up.up import run_with_realtime_print | ||
|
||
import pytest | ||
|
||
def test_run_print(): | ||
use_dir = os.path.expanduser("~") | ||
command = ["ls", use_dir] | ||
result_code = 0 | ||
for code , output in run_with_realtime_print(command): | ||
result_code = code | ||
assert code == 0, "bad return code" | ||
|
||
|
||
|