2023-10-26 16:42:29 +00:00
|
|
|
name: pre-commit
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- src/**
|
|
|
|
- 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:
|
2024-05-04 10:29:17 +00:00
|
|
|
name: Setup Application and Lint
|
2023-10-26 16:42:29 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2024-04-07 05:41:49 +00:00
|
|
|
- name: Set up Python 3.11
|
2023-10-26 16:42:29 +00:00
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: 3.11
|
|
|
|
|
|
|
|
- name: ⏬️ Install Dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt update && sudo apt install -y libegl1
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
|
|
|
|
- name: ⬇️ Install Application
|
2024-05-04 10:29:17 +00:00
|
|
|
run: pip install --no-cache-dir --upgrade .[dev]
|
2023-10-26 16:42:29 +00:00
|
|
|
|
|
|
|
- name: 🌡️ Validate Application
|
|
|
|
run: pre-commit run --hook-stage manual --all
|