mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 09:13:14 +00:00
parent
e7ed860114
commit
4a851a05ea
5 changed files with 93 additions and 4 deletions
58
.github/workflows/agent-ci.yml
vendored
Normal file
58
.github/workflows/agent-ci.yml
vendored
Normal 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
|
||||
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
|
@ -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,
|
||||
|
|
|
|||
10
.github/workflows/unit-tests.yml
vendored
10
.github/workflows/unit-tests.yml
vendored
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
######################
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue