mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-18 10:37:11 +00:00
51dfa48e2b
- Previously Khoj could only support Python upto 3.10 due to pytorch. But lots of folks had python 3.11 installed by default on their machines. This required installing python 3.10 and dealing with virtual envs. With Torch >= 2.0.1 now able to support python 3.11, at least one class of installation troubles for Khoj should drop. See https://github.com/pytorch/pytorch/issues/86566 for reference - Preliminary testing indicates using the new torch 2.x may reduce search time by 25% (from 80ms to 60ms on Mac M1) - Update Docs to not require mentioning python <=3.10 required - Update Github test workflow to run khoj tests with python 3.11 too
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
name: test
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
paths:
|
|
- src/khoj/**
|
|
- tests/**
|
|
- config/**
|
|
- pyproject.toml
|
|
- .pre-commit-config.yml
|
|
- .github/workflows/test.yml
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
paths:
|
|
- src/khoj/**
|
|
- tests/**
|
|
- config/**
|
|
- pyproject.toml
|
|
- .pre-commit-config.yml
|
|
- .github/workflows/test.yml
|
|
|
|
jobs:
|
|
test:
|
|
name: Run Tests
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python_version:
|
|
- '3.8'
|
|
- '3.9'
|
|
- '3.10'
|
|
- '3.11'
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
|
|
- name: ⏬️ Install Dependencies
|
|
run: |
|
|
sudo apt update && sudo apt install -y libegl1
|
|
python -m pip install --upgrade pip
|
|
|
|
- name: ⬇️ Install Application
|
|
run: pip install --upgrade .[dev]
|
|
|
|
- name: 🌡️ Validate Application
|
|
run: pre-commit run --hook-stage manual --all
|
|
|
|
- name: 🧪 Test Application
|
|
run: pytest
|