langchain/.github/workflows/doc_lint.yml

37 lines
833 B
YAML
Raw Normal View History

---
name: CI / cd .
on:
push:
2023-10-29 22:50:09 +00:00
branches: [ master ]
pull_request:
2023-10-29 22:50:09 +00:00
paths:
- 'docs/**'
- 'templates/**'
- 'cookbook/**'
2023-10-29 23:15:18 +00:00
- '.github/workflows/_lint.yml'
- '.github/workflows/doc_lint.yml'
2023-10-29 22:50:09 +00:00
workflow_dispatch:
jobs:
check:
name: Check for "from langchain import x" imports
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run import check
run: |
# We should not encourage imports directly from main init file
# Expect for hub
2023-10-29 23:15:18 +00:00
git grep 'from langchain import' {docs/docs,templates,cookbook} | grep -vE 'from langchain import (hub)' && exit 1 || exit 0
2023-10-29 22:50:09 +00:00
2023-10-29 23:15:18 +00:00
lint:
2024-02-01 19:39:00 +00:00
name: "-"
2023-10-29 22:50:09 +00:00
uses:
./.github/workflows/_lint.yml
with:
2023-10-29 23:15:18 +00:00
working-directory: "."
secrets: inherit