firecrawl-ci-integration
Sets up automated CI/CD workflows for FireCrawl scraping integrations.
Install
mkdir -p .claude/skills/firecrawl-ci-integration && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6918" && unzip -o skill.zip -d .claude/skills/firecrawl-ci-integration && rm skill.zipInstalls to .claude/skills/firecrawl-ci-integration
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Configure Firecrawl CI/CD integration with GitHub Actions and automatedKey capabilities
- →Configure GitHub Actions for CI/CD
- →Manage Firecrawl API key secrets
- →Implement mock-based unit tests
- →Set up integration tests for real scraping
- →Validate scraping behavior in pull requests
How it works
This skill configures GitHub Actions workflows to run unit tests with mocked Firecrawl SDK and integration tests that validate real scraping behavior using a Firecrawl API key.
Inputs & outputs
When to use firecrawl-ci-integration
- →Automate scraping integration tests
- →Configure CI pipelines
- →Validate scraping logic in PRs
About this skill
Firecrawl CI Integration
Overview
Set up CI/CD pipelines to test Firecrawl integrations automatically. Covers GitHub Actions workflow, API key secrets management, integration tests that validate real scraping, and mock-based unit tests for PRs.
Prerequisites
- GitHub repository with Actions enabled
- Firecrawl API key for testing (separate from production)
@mendable/firecrawl-jsinstalled
Instructions
Step 1: Configure Secrets
set -euo pipefail
# Store test API key in GitHub Actions secrets
gh secret set FIRECRAWL_API_KEY --body "fc-test-key-here"
Step 2: GitHub Actions Workflow
# .github/workflows/firecrawl-tests.yml
name: Firecrawl Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- run: npm ci
- run: npm test -- --coverage
# Unit tests use mocked SDK — no API key needed
integration-tests:
runs-on: ubuntu-latest
if: github.event_name == 'push' # Only on merge, not PRs (saves credits)
env:
FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- run: npm ci
- run: npm run test:integration
timeout-minutes: 5
Step 3: Integration Tests
// tests/firecrawl.integration.test.ts
import { describe, it, expect } from "vitest";
import FirecrawlApp from "@mendable/firecrawl-js";
const SKIP = !process.env.FIRECRAWL_API_KEY;
describe.skipIf(SKIP)("Firecrawl Integration", () => {
const firecrawl = new FirecrawlApp({
apiKey: process.env.FIRECRAWL_API_KEY!,
});
it("scrapes a page to markdown", async () => {
const result = await firecrawl.scrapeUrl("https://example.com", {
formats: ["markdown"],
});
expect(result.success).toBe(true);
expect(result.markdown).toBeDefined();
expect(result.markdown!.length).toBeGreaterThan(50);
expect(result.metadata?.title).toBeDefined();
}, 30000);
it("maps a site for URLs", async () => {
const result = await firecrawl.mapUrl("https://docs.firecrawl.dev");
expect(result.links).toBeDefined();
expect(result.links!.length).toBeGreaterThan(0);
}, 30000);
it("extracts structured data", async () => {
const result = await firecrawl.scrapeUrl("https://example.com", {
formats: ["extract"],
extract: {
schema: {
type: "object",
properties: {
title: { type: "string" },
description: { type: "string" },
},
},
},
});
expect(result.extract).toBeDefined();
expect(result.extract?.title).toBeDefined();
}, 30000);
});
Step 4: Mock-Based Unit Tests (No API Key)
// tests/scraper.unit.test.ts
import { describe, it, expect, vi } from "vitest";
vi.mock("@mendable/firecrawl-js", () => ({
default: vi.fn().mockImplementation(() => ({
scrapeUrl: vi.fn().mockResolvedValue({
success: true,
markdown: "# Test Page\n\nContent here",
metadata: { title: "Test", sourceURL: "https://example.com" },
}),
mapUrl: vi.fn().mockResolvedValue({
success: true,
links: ["https://example.com/a", "https://example.com/b"],
}),
})),
}));
import { processPage } from "../src/scraper";
describe("Scraper Unit Tests", () => {
it("processes scraped content correctly", async () => {
const result = await processPage("https://example.com");
expect(result.title).toBe("Test");
expect(result.content).toContain("Content here");
});
});
Step 5: Credit-Aware CI
# Only run expensive crawl tests on release tags
integration-crawl:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
env:
FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci
- run: npm run test:crawl
timeout-minutes: 10
Error Handling
| Issue | Cause | Solution |
|---|---|---|
| Secret not found | Missing GitHub secret | gh secret set FIRECRAWL_API_KEY |
| Integration test timeout | Slow scrape response | Increase timeout to 30s+ |
| Tests pass locally, fail in CI | Missing env var | Use skipIf(!process.env.FIRECRAWL_API_KEY) |
| Credit burn from PRs | Integration tests on every PR | Run integration tests only on merge |
Resources
- GitHub Actions Secrets
- Vitest
- Firecrawl Node SDK
Next Steps
For deployment patterns, see firecrawl-deploy-integration.
When not to use it
- →When integration tests are not needed for pull requests
- →When real scraping validation is not required
Prerequisites
Limitations
- →Integration tests are only run on merge to main to save credits
- →Unit tests use a mocked SDK and do not require an API key
How it compares
This workflow automates the testing of Firecrawl integrations within a CI/CD pipeline, unlike manual testing of scraping functionalities.
Compared to similar skills
firecrawl-ci-integration side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| firecrawl-ci-integration (this skill) | 1 | 27d | Review | Intermediate |
| playwright-mcp | 33 | 6mo | No flags | Intermediate |
| dev-browser | 53 | 4mo | Review | Intermediate |
| chrome-devtools | 41 | 7mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
playwright-mcp
sfc-gh-dflippo
Browser testing, web scraping, and UI validation using Playwright MCP. Use this skill when you need to test Streamlit apps, validate web interfaces, test responsive design, check accessibility, or automate browser interactions through MCP tools.
dev-browser
SawyerHood
Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.
chrome-devtools
mrgoonie
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.
e2e-testing-patterns
wshobson
Master end-to-end testing with Playwright and Cypress to build reliable test suites that catch bugs, improve confidence, and enable fast deployment. Use when implementing E2E tests, debugging flaky tests, or establishing testing standards.
agent-browser
vercel-labs
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
browser-tools
Whamp
Lightweight Chrome automation toolkit with shared configuration, JSON-first output, and six focused scripts for starting, navigating, inspecting, capturing, evaluating, and cleaning up browser sessions.