add dark mode images #1008
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
name: Docs checker | |
on: | |
push: | |
branches: | |
- '*' | |
schedule: | |
- cron: '0 9 * * 2' | |
workflow_dispatch: | |
jobs: | |
spellcheck: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
pip install pyspelling | |
- name: Install Aspell | |
run: | | |
sudo apt-get install aspell aspell-en | |
- name: Spellcheck Markdown files | |
run: | | |
pyspelling -c .github/.pyspelling.yaml | |
README-link-checker: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install markdown-link-check | |
run: npm install -g markdown-link-check | |
- name: Check links in README.md | |
run: markdown-link-check README.md | |
docs-link-checker: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y linkchecker | |
- name: Check links | |
id: linkcheck | |
run: linkchecker https://docs.lavague.ai/en/latest/ | |
bullet-points-format-checker: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run markdown formatting check | |
run: | | |
chmod +x .github/bullet-points.sh | |
.github/bullet-points.sh | |
lavague-qa-checker: | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
LAVAGUE_TELEMETRY: "NONE" | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
pip install lavague-qa | |
wget https://raw.githubusercontent.com/lavague-ai/LaVague/main/lavague-qa/features/demo_amazon.feature | |
- name: Check QA command | |
run: | | |
lavague-qa --headless --url https://www.amazon.fr --feature ./demo_amazon.feature | |
docs-examples-checker: | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }} | |
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
LAVAGUE_TELEMETRY: "NONE" | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
pip cache purge | |
pip install lavague | |
pip install pyarrow | |
pip install lavague-contexts-gemini | |
pip install llama-index-multi-modal-llms-anthropic | |
pip install lavague-contexts-fireworks | |
pip install llama-index-embeddings-huggingface | |
pip install llama-index-llms-groq | |
pip install ipython>=7.34.0 | |
pip install text_generation | |
wget https://raw.githubusercontent.com/lavague-ai/LaVague/main/examples/knowledge/doctolib_knowledge.txt | |
wget https://raw.githubusercontent.com/lavague-ai/LaVague/main/examples/knowledge/hf_knowledge.txt | |
- name: Extract Python code | |
run: | | |
python .github/extract-python-code.py ./docs/docs/examples/*.md docs/docs/use-cases/*.md ./docs/docs/get-started/*.md ./docs/docs/module-guides/*.md ./docs/docs/learn/*.md | |
- name: Run extracted Python scripts | |
run: | | |
if [ -f generated_scripts.txt ]; then | |
overall_status=0 | |
while IFS= read -r script_file | |
do | |
echo "Running $script_file" | |
cat "$script_file" | |
python "$script_file" | |
if [ $? -ne 0 ]; then | |
echo "Script $script_file failed" | |
overall_status=1 | |
fi | |
done < generated_scripts.txt | |
if [ $overall_status -ne 0 ]; then | |
echo "One or more scripts failed." | |
exit 1 | |
else | |
echo "All scripts ran successfully." | |
fi | |
else | |
echo "No generated scripts found." | |
fi | |
notify-docs-examples-failure: | |
runs-on: ubuntu-latest | |
needs: docs-examples-checker | |
if: failure() | |
steps: | |
- name: Notify Discord on docs-examples failure | |
run: | | |
curl -X POST -H "Content-Type: application/json" \ | |
-d "{\"content\": \"<@762664509813817345> Cron job for 'docs-examples-checker' failed\"}" \ | |
${{ secrets.DOCS_DISCORD_WEBHOOK }} | |
notify-lavague-qa-failure: | |
runs-on: ubuntu-latest | |
needs: lavague-qa-checker | |
if: failure() | |
steps: | |
- name: Notify Discord on docs-examples failure | |
run: | | |
curl -X POST -H "Content-Type: application/json" \ | |
-d "{\"content\": \"<@762664509813817345> Cron job for 'lavague-qa-checker' failed\"}" \ | |
${{ secrets.DOCS_DISCORD_WEBHOOK }} | |
notify-docs-links-failure: | |
runs-on: ubuntu-latest | |
needs: [docs-link-checker, README-link-checker] | |
if: failure() | |
steps: | |
- name: Notify Discord on docs-links failure | |
run: | | |
curl -X POST -H "Content-Type: application/json" \ | |
-d "{\"content\": \"<@762664509813817345> Cron job for 'docs-link-checker' or 'README-link-checker' failed\"}" \ | |
${{ secrets.DOCS_DISCORD_WEBHOOK }} | |
notify-checks-success: | |
runs-on: ubuntu-latest | |
needs: [docs-link-checker, docs-examples-checker] | |
if: success() | |
steps: | |
- name: Notify Discord on successful checks | |
run: | | |
curl -X POST -H "Content-Type: application/json" \ | |
-d "{\"content\": \"<@762664509813817345> Checks successfully passed\"}" \ | |
${{ secrets.DOCS_DISCORD_WEBHOOK }} |