Add linkcheck

This commit is contained in:
William Fu-Hinthorn
2024-02-19 11:49:30 -08:00
parent f3c940d22b
commit d34e9aca91
+39
View File
@@ -0,0 +1,39 @@
name: Check Links
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check links in Markdown files
uses: gaurav-nelson/github-action-markdown-link-check@v1
notebook-link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U pytest pytest-check-links langsmith langchain GitPython
- name: Check links in notebooks
env:
LANGCHAIN_API_KEY: test
run: pytest -o python_files=non_python_only --check-links --ignore="*.py" -k .ipynb --check-links-ignore "https://(api|web)\.smith\.langchain\.com/.*" .