Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

feat(ci): self-hosted server test suite

Gergő Móricz99765605670f
diff --git a/.github/workflows/clean-before-24h-complete-jobs.yml b/.github/workflows/clean-before-24h-complete-jobs.yml
deleted file mode 100644
index d897a19ad..000000000
--- a/.github/workflows/clean-before-24h-complete-jobs.yml
+++ /dev/null
@@ -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"
diff --git a/.github/workflows/test-server-self-host.yml b/.github/workflows/test-server-self-host.yml
new file mode 100644
index 000000000..372c43408
--- /dev/null
+++ b/.github/workflows/test-server-self-host.yml
@@ -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