firecrawl/.github/workflows/python-tests.yml

48 lines
1.3 KiB
YAML
Raw Normal View History

2024-05-28 01:14:00 +08:00
name: Run Python SDK E2E Tests
on:
pull_request:
branches:
- main
env:
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
2024-05-28 01:32:34 +08:00
steps:
2024-05-28 01:14:00 +08:00
- uses: actions/checkout@v3
2024-05-28 01:32:34 +08:00
- 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
2024-05-28 01:14:00 +08:00
- 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
2024-05-28 01:21:33 +08:00
pip install -r requirements.txt
2024-05-28 01:14:00 +08:00
working-directory: ./apps/python-sdk
- name: Test with pytest
run: |
pytest firecrawl/__tests__/e2e_withAuth/test.py
working-directory: ./apps/python-sdk