forked from mendableai/firecrawl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mendableai#183 from mendableai/test-sdks
[Test] Added sdk e2e tests
- Loading branch information
Showing
16 changed files
with
596 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Run JavaScript SDK E2E Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
env: | ||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
BULL_AUTH_KEY: ${{ secrets.BULL_AUTH_KEY }} | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
HOST: ${{ secrets.HOST }} | ||
LLAMAPARSE_API_KEY: ${{ secrets.LLAMAPARSE_API_KEY }} | ||
LOGTAIL_KEY: ${{ secrets.LOGTAIL_KEY }} | ||
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} | ||
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }} | ||
NUM_WORKERS_PER_QUEUE: ${{ secrets.NUM_WORKERS_PER_QUEUE }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
PLAYWRIGHT_MICROSERVICE_URL: ${{ secrets.PLAYWRIGHT_MICROSERVICE_URL }} | ||
PORT: ${{ secrets.PORT }} | ||
REDIS_URL: ${{ secrets.REDIS_URL }} | ||
SCRAPING_BEE_API_KEY: ${{ secrets.SCRAPING_BEE_API_KEY }} | ||
SUPABASE_ANON_TOKEN: ${{ secrets.SUPABASE_ANON_TOKEN }} | ||
SUPABASE_SERVICE_TOKEN: ${{ secrets.SUPABASE_SERVICE_TOKEN }} | ||
SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | ||
TEST_API_KEY: ${{ secrets.TEST_API_KEY }} | ||
HYPERDX_API_KEY: ${{ secrets.HYPERDX_API_KEY }} | ||
HDX_NODE_BETA_MODE: 1 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
services: | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
- name: Install dependencies for API | ||
run: pnpm install | ||
working-directory: ./apps/api | ||
- name: Start the application | ||
run: npm start & | ||
working-directory: ./apps/api | ||
- name: Start workers | ||
run: npm run workers & | ||
working-directory: ./apps/api | ||
- name: Install dependencies for JavaScript SDK | ||
run: pnpm install | ||
working-directory: ./apps/js-sdk/firecrawl | ||
- name: Run E2E tests for JavaScript SDK | ||
run: npm run test | ||
working-directory: ./apps/js-sdk/firecrawl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Run Python SDK E2E Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
env: | ||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
BULL_AUTH_KEY: ${{ secrets.BULL_AUTH_KEY }} | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
HOST: ${{ secrets.HOST }} | ||
LLAMAPARSE_API_KEY: ${{ secrets.LLAMAPARSE_API_KEY }} | ||
LOGTAIL_KEY: ${{ secrets.LOGTAIL_KEY }} | ||
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} | ||
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }} | ||
NUM_WORKERS_PER_QUEUE: ${{ secrets.NUM_WORKERS_PER_QUEUE }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
PLAYWRIGHT_MICROSERVICE_URL: ${{ secrets.PLAYWRIGHT_MICROSERVICE_URL }} | ||
PORT: ${{ secrets.PORT }} | ||
REDIS_URL: ${{ secrets.REDIS_URL }} | ||
SCRAPING_BEE_API_KEY: ${{ secrets.SCRAPING_BEE_API_KEY }} | ||
SUPABASE_ANON_TOKEN: ${{ secrets.SUPABASE_ANON_TOKEN }} | ||
SUPABASE_SERVICE_TOKEN: ${{ secrets.SUPABASE_SERVICE_TOKEN }} | ||
SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | ||
TEST_API_KEY: ${{ secrets.TEST_API_KEY }} | ||
HYPERDX_API_KEY: ${{ secrets.HYPERDX_API_KEY }} | ||
HDX_NODE_BETA_MODE: 1 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
services: | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
- name: Install dependencies for API | ||
run: pnpm install | ||
working-directory: ./apps/api | ||
- name: Start the application | ||
run: npm start & | ||
working-directory: ./apps/api | ||
id: start_app | ||
- name: Start workers | ||
run: npm run workers & | ||
working-directory: ./apps/api | ||
id: start_workers | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
working-directory: ./apps/python-sdk | ||
- name: Run E2E tests for Python SDK | ||
run: | | ||
pytest firecrawl/__tests__/e2e_withAuth/test.py | ||
working-directory: ./apps/python-sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
API_URL=http://localhost:3002 | ||
TEST_API_KEY=fc-YOUR_API_KEY | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.