From serpapi-pack
Sets up GitHub Actions CI for SerpApi with fixture-based pytest tests for PRs (no credits used) and live integration tests on main branch only.
How this skill is triggered — by the user, by Claude, or both
Slash command
/serpapi-pack:serpapi-ci-integrationThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
CI for SerpApi should use fixture-based tests (no API credits consumed) for PRs, with optional live integration tests on main branch only.
CI for SerpApi should use fixture-based tests (no API credits consumed) for PRs, with optional live integration tests on main branch only.
name: SerpApi Tests
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: '3.12' }
- run: pip install serpapi pytest
- run: pytest tests/ -v # Uses fixtures, no API key needed
integration:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
env:
SERPAPI_API_KEY: ${{ secrets.SERPAPI_API_KEY }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: '3.12' }
- run: pip install serpapi pytest
- run: pytest tests/integration/ -v --timeout=30
# tests/test_search_parser.py
import json, pytest
def load_fixture(name):
with open(f"tests/fixtures/{name}.json") as f:
return json.load(f)
def test_parse_organic_results():
result = load_fixture("google_python_tutorial")
assert "organic_results" in result
assert len(result["organic_results"]) > 0
assert result["organic_results"][0]["title"]
def test_parse_youtube_results():
result = load_fixture("youtube_react_hooks")
assert "video_results" in result
assert result["video_results"][0]["length"]
def test_handle_no_results():
result = load_fixture("google_no_results")
assert result.get("organic_results", []) == []
# tests/integration/test_serpapi_live.py
import serpapi, os, pytest
@pytest.fixture
def client():
key = os.environ.get("SERPAPI_API_KEY")
if not key:
pytest.skip("SERPAPI_API_KEY not set")
return serpapi.Client(api_key=key)
def test_account_has_credits(client):
account = client.account()
assert account["plan_searches_left"] > 0
def test_google_search_returns_results(client):
result = client.search(engine="google", q="python", num=1)
assert result["search_metadata"]["status"] == "Success"
assert len(result["organic_results"]) > 0
| CI Issue | Cause | Solution |
|---|---|---|
| Fixture not found | Missing test data | Record fixtures with record_fixture() |
| Integration test uses credits | Tests on every PR | Only run on main branch |
| Flaky results | Search results change | Use fixtures for deterministic tests |
For deployment patterns, see serpapi-deploy-integration.
npx claudepluginhub ia23a-lachnita/claude-code-plugins-plus-fix-skills --plugin serpapi-pack7plugins reuse this skill
First indexed Jul 10, 2026
Showing the 6 earliest of 7 plugins
Sets up GitHub Actions CI for SerpApi with fixture-based pytest tests for PRs (no credits used) and live integration tests on main branch only.
Configure Firecrawl CI/CD integration with GitHub Actions and automated scraping tests. Use when setting up automated testing of Firecrawl integrations, configuring CI pipelines, or validating scraping behavior in pull requests. Trigger with phrases like "firecrawl CI", "firecrawl GitHub Actions", "firecrawl automated tests", "CI firecrawl", "test firecrawl in CI".
Sets up CI/CD pipelines for Perplexity Sonar API integrations using GitHub Actions, including mocked unit tests and live integration tests.