-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (53 loc) · 1.75 KB
/
Copy pathmain-ci.yml
File metadata and controls
64 lines (53 loc) · 1.75 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Main CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Lint with ruff
run: |
pip install ruff
ruff check zero_api_key_web_search/ tests/
- name: Type check with pyright
run: |
pip install pyright
pyright zero_api_key_web_search/
- name: Run unit tests with coverage
run: |
pip install coverage
coverage run -m unittest discover -s tests -v
coverage report --fail-under=80 --include="zero_api_key_web_search/*"
- name: Run benchmark regression
run: |
python benchmarks/run_benchmark.py --json > /tmp/benchmark.json
python -c "import json; payload=json.load(open('/tmp/benchmark.json', 'r', encoding='utf-8')); assert payload['failed'] == 0; assert payload['total'] >= 3"
- name: Build package
run: |
python -m build
twine check dist/*
- name: Smoke installed wheel
run: |
python -m venv /tmp/cvs-wheel
/tmp/cvs-wheel/bin/pip install --upgrade pip
/tmp/cvs-wheel/bin/pip install dist/*.whl
/tmp/cvs-wheel/bin/zero-search --help
/tmp/cvs-wheel/bin/zero-browse --help
/tmp/cvs-wheel/bin/zero-verify --help
/tmp/cvs-wheel/bin/zero-report --help
test -x /tmp/cvs-wheel/bin/zero-mcp
test -x /tmp/cvs-wheel/bin/cross-validated-search-mcp
test -x /tmp/cvs-wheel/bin/free-web-search-mcp