Files
firecrawl/.github/workflows/test-server-self-host.yml
T
2025-02-19 22:02:32 +01:00

52 lines
1.2 KiB
YAML

name: Self-hosted Server Test Suite
on:
workflow_dispatch:
env:
PORT: 3002
REDIS_URL: redis://localhost:6379
ENV: ${{ secrets.ENV }}
jobs:
test:
name: Run tests
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
run: pnpm install
working-directory: ./apps/api
- name: Start the application
run: npm start > api.log 2>&1 &
working-directory: ./apps/api
id: start_app
- name: Start workers
run: npm run workers > worker.log 2>&1 &
working-directory: ./apps/api
id: start_workers
- name: Run snippet tests
run: |
npm run test:snips
working-directory: ./apps/api
continue-on-error: true
- name: Kill instances
run: pkill -9 node
- uses: actions/upload-artifact@v4
with:
name: Logs
path: |
./apps/api/api.log
./apps/api/worker.log