mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 03:29:01 +08:00
feat(ci): self-hosted server test suite
This commit is contained in:
parent
dab0016669
commit
9976560567
@ -1,20 +0,0 @@
|
|||||||
name: Clean Every 30 Minutes Before 24h Completed Jobs
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '30 * * * *'
|
|
||||||
|
|
||||||
env:
|
|
||||||
BULL_AUTH_KEY: ${{ secrets.BULL_AUTH_KEY }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
clean-jobs:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Send GET request to clean jobs
|
|
||||||
run: |
|
|
||||||
response=$(curl --write-out '%{http_code}' --silent --output /dev/null --max-time 180 https://api.firecrawl.dev/admin/${{ secrets.BULL_AUTH_KEY }}/clean-before-24h-complete-jobs)
|
|
||||||
if [ "$response" -ne 200 ]; then
|
|
||||||
echo "Failed to clean jobs. Response: $response"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Successfully cleaned jobs. Response: $response"
|
|
42
.github/workflows/test-server-self-host.yml
vendored
Normal file
42
.github/workflows/test-server-self-host.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
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 &
|
||||||
|
working-directory: ./apps/api
|
||||||
|
id: start_app
|
||||||
|
- name: Start workers
|
||||||
|
run: npm run workers &
|
||||||
|
working-directory: ./apps/api
|
||||||
|
id: start_workers
|
||||||
|
- name: Run snippet tests
|
||||||
|
run: |
|
||||||
|
npm run test:snips
|
||||||
|
working-directory: ./apps/api
|
Loading…
x
Reference in New Issue
Block a user