Skip to content

Commit 2777f73

Browse files
committed
Add CI support.
1 parent 05f5365 commit 2777f73

2 files changed

Lines changed: 71 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["3.11", "3.12", "3.13"]
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
- name: Install dependencies
23+
run: |
24+
pip install --upgrade pip
25+
pip install rich httpx prompt_toolkit
26+
pip install -e .
27+
28+
- name: Run tests
29+
run: python -m unittest discover -s tests -v
30+
31+
- name: Build package
32+
run: |
33+
pip install build
34+
python -m build

Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
PYTHON ?= python3
2+
VENV ?= venv
3+
PIP = $(VENV)/bin/pip
4+
5+
.PHONY: help setup install test build run clean
6+
7+
help:
8+
@echo "Targets:"
9+
@echo " setup create virtualenv ($(VENV))"
10+
@echo " install install deps + package into $(VENV)"
11+
@echo " test run unit tests (unittest discover)"
12+
@echo " build build sdist + wheel (requires 'build')"
13+
@echo " run launch the interactive TUI agent"
14+
@echo " clean remove virtualenv and build artifacts"
15+
16+
setup: $(VENV)/bin/python
17+
18+
$(VENV)/bin/python:
19+
$(PYTHON) -m venv $(VENV)
20+
21+
install: setup
22+
$(PIP) install rich httpx prompt_toolkit
23+
$(PIP) install -e .
24+
25+
test: install
26+
$(VENV)/bin/python -m unittest discover -s tests -v
27+
28+
build: setup
29+
$(PIP) install build
30+
$(VENV)/bin/python -m build
31+
32+
run: install
33+
$(VENV)/bin/python -m python_agent_harness.cli run
34+
35+
clean:
36+
rm -rf $(VENV) build dist *.egg-info
37+
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true

0 commit comments

Comments
 (0)