mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
fd0a2f55f8
- Run mypy on git push (not every commit) but for all files - Running it on pre-commit, doesn't make sense as mypy wants to look at all files, not just diff files - But this is too time consuming to run every commit, so run on push - Update development section documentation on installing, manually running pre-commit for validation that includes running mypy checks
56 lines
1.1 KiB
YAML
56 lines
1.1 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'
|
|
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
|