Skip to content

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

Merge remote-tracking branch 'origin/main' into f/rust-sdk

rafaelsideguide697501cc8abf
diff --cc .github/workflows/fly.yml
index 9902d0166,9e4b85a83..5488a9445
--- a/.github/workflows/fly.yml
+++ b/.github/workflows/fly.yml
@@@ -168,54 -168,54 +168,89 @@@ jobs
- name: Run E2E tests for JavaScript SDK
run: npm run test
working-directory: ./apps/js-sdk/firecrawl
-
+
+ go-sdk-tests:
+ name: Go SDK Tests
+ needs: pre-deploy-e2e-tests
+ runs-on: ubuntu-latest
+ services:
+ redis:
+ image: redis
+ ports:
+ - 6379:6379
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Go
+ uses: actions/setup-go@v5
+ with:
+ go-version-file: "go.mod"
+ - 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: Install dependencies for Go SDK
+ run: go mod tidy
+ working-directory: ./apps/go-sdk
+ - name: Run tests for Go SDK
+ run: go test -v ./... -timeout 180s
+ working-directory: ./apps/go-sdk/firecrawl
+
+ rust-sdk-tests:
+ name: Rust SDK Tests
+ needs: pre-deploy-e2e-tests
+ runs-on: ubuntu-latest
+ services:
+ redis:
+ image: redis
+ ports:
+ - 6379:6379
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ - 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 Rust
+ uses: actions/setup-rust@v1
+ with:
+ rust-version: stable
+ - name: Try the lib build
+ working-directory: ./apps/rust-sdk
+ run: cargo build
+ - name: Run E2E tests for Rust SDK
+ run: cargo test --test e2e_with_auth
+
deploy:
name: Deploy app
runs-on: ubuntu-latest
- needs: [pre-deploy-test-suite, python-sdk-tests, js-sdk-tests]
+ needs: [pre-deploy-test-suite, python-sdk-tests, js-sdk-tests, rust-sdk-tests]
steps:
- uses: actions/checkout@v3
- - name: Change directory
- run: cd apps/api
- uses: superfly/flyctl-actions/setup-flyctl@master
- - run: flyctl deploy ./apps/api --remote-only -a firecrawl-scraper-js
+ - run: flyctl deploy --remote-only -a firecrawl-scraper-js
+ working-directory: ./apps/api
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
+ BULL_AUTH_KEY: ${{ secrets.BULL_AUTH_KEY }}
build-and-publish-python-sdk:
name: Build and publish Python SDK
@@@ -297,39 -297,4 +332,38 @@@
run: |
npm run build-and-publish
working-directory: ./apps/js-sdk/firecrawl
-
-
+ build-and-publish-rust-sdk:
+ name: Build and publish Rust SDK
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Set up Rust
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ default: true
+ profile: minimal
+
+ - name: Install dependencies
+ run: cargo build --release
+
+ - name: Run version check script
+ id: version_check_script
+ run: |
+ VERSION_INCREMENTED=$(cargo search --limit 1 my_crate_name | grep my_crate_name)
+ echo "VERSION_INCREMENTED=$VERSION_INCREMENTED" >> $GITHUB_ENV
+
+ - name: Build the package
+ if: ${{ env.VERSION_INCREMENTED == 'true' }}
+ run: cargo package
+ working-directory: ./apps/rust-sdk
+
+ - name: Publish to crates.io
+ if: ${{ env.VERSION_INCREMENTED == 'true' }}
+ env:
+ CARGO_REG_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
+ run: cargo publish
+ working-directory: ./apps/rust-sdk