Skip to content

Commit 3c4450b

Browse files
jwfingclaude
andcommitted
Add CI workflow for unit and integration tests
Unit tests run on Python 3.11-3.13 for every push and PR to main. Integration tests run only on push to main, using secrets for Insforge credentials. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 753f039 commit 3c4450b

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
unit-tests:
11+
name: Unit Tests
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.11", "3.12", "3.13"]
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: |
25+
pip install -e .
26+
pip install pytest pytest-asyncio
27+
28+
- name: Run unit tests
29+
run: python -m pytest tests/ --ignore=tests/test_integration.py -v
30+
31+
integration-tests:
32+
name: Integration Tests
33+
runs-on: ubuntu-latest
34+
needs: unit-tests
35+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- uses: actions/setup-python@v5
40+
with:
41+
python-version: "3.13"
42+
43+
- name: Install dependencies
44+
run: |
45+
pip install -e .
46+
pip install pytest pytest-asyncio
47+
48+
- name: Run integration tests
49+
env:
50+
INSFORGE_API_KEY: ${{ secrets.INSFORGE_API_KEY }}
51+
INSFORGE_API_BASE_URL: ${{ secrets.INSFORGE_API_BASE_URL }}
52+
INSFORGE_TEST_EMAIL: ${{ secrets.INSFORGE_TEST_EMAIL }}
53+
INSFORGE_TEST_PASSWORD: ${{ secrets.INSFORGE_TEST_PASSWORD }}
54+
INSFORGE_FUNCTION_SLUG: ${{ secrets.INSFORGE_FUNCTION_SLUG }}
55+
INSFORGE_TABLE_NAME: ${{ secrets.INSFORGE_TABLE_NAME }}
56+
run: python -m pytest tests/test_integration.py -v

0 commit comments

Comments
 (0)