mirror of
https://github.com/hwchase17/langchain
synced 2024-10-29 17:07:25 +00:00
35 lines
784 B
YAML
35 lines
784 B
YAML
---
|
|
name: Docs, templates, cookbook lint
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
paths:
|
|
- 'docs/**'
|
|
- 'templates/**'
|
|
- 'cookbook/**'
|
|
- '.github/workflows/_lint.yml'
|
|
- '.github/workflows/doc_lint.yml'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check:
|
|
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
|
|
git grep 'from langchain import' {docs/docs,templates,cookbook} | grep -vE 'from langchain import (hub)' && exit 1 || exit 0
|
|
|
|
lint:
|
|
uses:
|
|
./.github/workflows/_lint.yml
|
|
with:
|
|
working-directory: "."
|
|
secrets: inherit |