mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
34d5cd2bd8
The test workflow fails regularly with an OperationCancelled error. This is an intermittent failure that gets resolved on running the failed workflows a few times.
59 lines
1.2 KiB
YAML
59 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.9'
|
|
- '3.10'
|
|
- '3.11'
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- 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
|
|
timeout-minutes: 10
|