ci: Add CI actions (#972)

* ci: Add CI actions

* cr

* cr

* cr
This commit is contained in:
Brace Sproul 2026-02-23 19:11:41 -08:00 • committed by GitHub
parent e7ed860114
commit 4a851a05ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 93 additions and 4 deletions

58
.github/workflows/agent-ci.yml vendored Normal file
View file

@ -0,0 +1,58 @@
name: Agent CI
on:
push:
branches: ["main"]
paths:
- "apps/agent/**"
pull_request:
paths:
- "apps/agent/**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Agent lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/agent
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- name: Install dependencies
run: uv sync --locked --extra dev
- name: Run lint
run: make lint
format:
name: Agent format check
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/agent
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- name: Install dependencies
run: uv sync --locked --extra dev
- name: Run format check
run: make format-check
unit-tests:
name: Agent unit tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/agent
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- name: Install dependencies
run: uv sync --locked --extra dev
- name: Run unit tests
run: make test

View file

@ -5,7 +5,17 @@ name: CI
on:
push:
branches: ["main"]
paths:
- "apps/web/**"
- "packages/shared/**"
- "*"
- ".*"
pull_request:
paths:
- "apps/web/**"
- "packages/shared/**"
- "*"
- ".*"
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI
# If another push to the same PR or branch happens while this workflow is still running,

View file

@ -6,7 +6,17 @@ permissions:
on:
push:
branches: ["main"]
paths:
- "apps/web/**"
- "packages/shared/**"
- "*"
- ".*"
pull_request:
paths:
- "apps/web/**"
- "packages/shared/**"
- "*"
- ".*"
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI
# If another push to the same PR or branch happens while this workflow is still running,

View file

@ -1,4 +1,4 @@
.PHONY: all format lint test tests integration_tests help run dev
.PHONY: all format format-check lint test tests integration_tests help run dev
# Default target executed when no arguments are given to make.
all: help
@ -23,10 +23,18 @@ install:
TEST_FILE ?= tests/
test tests:
uv run pytest -vvv $(TEST_FILE)
@if [ -d "$(TEST_FILE)" ] || [ -f "$(TEST_FILE)" ]; then \
uv run pytest -vvv $(TEST_FILE); \
else \
echo "Skipping tests: path not found: $(TEST_FILE)"; \
fi
integration_tests:
uv run pytest -vvv tests/integration_tests/
@if [ -d "tests/integration_tests/" ] || [ -f "tests/integration_tests/" ]; then \
uv run pytest -vvv tests/integration_tests/; \
else \
echo "Skipping integration tests: path not found: tests/integration_tests/"; \
fi
######################
# LINTING AND FORMATTING
@ -42,6 +50,9 @@ format:
uv run ruff format $(PYTHON_FILES)
uv run ruff check --fix $(PYTHON_FILES)
format-check:
uv run ruff format $(PYTHON_FILES) --check
######################
# HELP
######################

View file

@ -28,11 +28,11 @@ from langchain_openai import ChatOpenAI
from .encryption import decrypt_token
from .integrations.langsmith import _create_langsmith_sandbox
from .middleware import (
TimeoutExecuteToolMiddleware,
ToolErrorMiddleware,
check_message_queue_before_model,
open_pr_if_needed,
post_to_linear_after_model,
TimeoutExecuteToolMiddleware,
)
from .prompt import construct_system_prompt
from .tools import commit_and_open_pr, fetch_url, http_request