Skip to content

Commit

Permalink
chore(weave): Add docs to CI and build process (#2682)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong authored Oct 11, 2024
1 parent 56ee060 commit 998cb18
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
is_test:
description: 'Use Test Pypi'
description: "Use Test Pypi"
required: true
type: boolean
default: true
Expand All @@ -28,6 +28,9 @@ jobs:
- name: Build dist
run: |
uv build
- name: Make docs
run: |
make docs
- name: upload test distribution
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ inputs.is_test }}
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,22 @@ jobs:
- name: Run nox
run: nox -e lint

trace-docs:
name: Trace docs
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Setup docs
run: make setup-docs-ci
- name: Run docs
run: make docs

trace-tests:
name: Trace nox tests
timeout-minutes: 10
Expand Down
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.PHONY: docs build

setup-docs-ci:
pip install -e .[docs]
playwright install

cd docs && \
npm install --global yarn && \
npm install

docs:
cd docs && make generate_all

build:
uv build

prepare-release: docs build
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies = [
]

[project.optional-dependencies]
trace_server = []
docs = ["playwright", "lazydocs", "nbformat", "nbconvert"]
anthropic = ["anthropic>=0.18.0"]
cerebras = ["cerebras-cloud-sdk"]
cohere = ["cohere>=5.9.1,<5.9.3"]
Expand Down

0 comments on commit 998cb18

Please sign in to comment.