-
-
Notifications
You must be signed in to change notification settings - Fork 33
45 lines (37 loc) · 1.43 KB
/
test.yml
File metadata and controls
45 lines (37 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Test
on:
push:
branches: [ main, staging ]
pull_request:
branches: [ main, staging ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
pip install pytest pytest-cov pytest-asyncio flake8 mypy types-requests beautifulsoup4 types-beautifulsoup4
- name: Run linting
run: |
flake8 cursor_agent_tools tests --config=.flake8
mypy cursor_agent_tools tests --config-file=.mypy.ini
- name: Run tests with coverage
run: |
# Run tests with -xvs to show output, make it verbose, and not capture output
# Use -k "not" expressions to skip tests that require API keys or file system access
python -m pytest tests/ -v --ignore=tests/requires_api/ -k "not test_openai_with_proxy and not test_chat_with_user_info and not test_file_tools and not test_image" --cov=cursor_agent_tools --cov-report=term-missing
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# file: ./coverage.xml
# fail_ci_if_error: true