Skip to content

Commit 370880b

Browse files
committed
Add GitHub Actions workflows for automated testing
1 parent 7218ef2 commit 370880b

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# GitHub Actions Workflows
2+
3+
This directory contains GitHub Actions workflows that automatically run tests for the osmosis-wrap package.
4+
5+
## Workflows
6+
7+
### test.yml
8+
9+
This workflow runs on:
10+
- Every push to the main branch
11+
- Every pull request to the main branch
12+
13+
It performs the following steps:
14+
1. Sets up Python environments (3.8, 3.9, 3.10)
15+
2. Installs the required dependencies
16+
3. Runs the pytest tests in test.py
17+
18+
The workflow validates that the osmosis-wrap functionality works correctly with various LLM API clients including:
19+
- Anthropic
20+
- OpenAI
21+
- LangChain
22+
23+
## Test Skip Behavior
24+
25+
Some tests are conditionally skipped if the corresponding packages are not installed. This allows the test suite to run even if optional dependencies are not present.

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.8', '3.9', '3.10']
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install pytest
28+
pip install -e .
29+
# Install optional dependencies for full test coverage
30+
pip install anthropic openai langchain langchain-core
31+
32+
- name: Run tests
33+
run: |
34+
pytest test.py -v

0 commit comments

Comments
 (0)