feat(github/ci): improvements

This commit is contained in:
Gergő Móricz 2025-02-19 20:51:38 +01:00
parent 055f7d2da0
commit 1a9f6b985a
5 changed files with 65 additions and 6 deletions

View File

@ -4,9 +4,6 @@ env:
DOTNET_VERSION: '6.0.x'
on:
push:
branches:
- mog/webscraper-refactor
workflow_dispatch:
jobs:

View File

@ -8,6 +8,8 @@ on:
push:
branches:
- main
paths:
- apps/api/**
workflow_dispatch:
jobs:

27
.github/workflows/publish-js-sdk.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Publish JS SDK
on:
push:
branches:
- main
paths:
- apps/js-sdk/firecrawl/package.json
env:
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Authenticate
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish
run: npm publish
working-directory: ./apps/js-sdk/firecrawl

30
.github/workflows/test-js-sdk.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: JS SDK Test Suite
on:
pull_request:
branches:
- main
paths:
- apps/js-sdk/firecrawl/**
env:
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
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/js-sdk/firecrawl
- name: Run tests
run: pnpm run test
working-directory: ./apps/js-sdk/firecrawl

View File

@ -1,8 +1,11 @@
name: CI/CD
name: Server Test Suite
on:
pull_request:
branches:
- main
paths:
- apps/api/**
# schedule:
# - cron: '0 */4 * * *'
@ -31,8 +34,8 @@ env:
ENV: ${{ secrets.ENV }}
jobs:
pre-deploy:
name: Pre-deploy checks
test:
name: Run tests
runs-on: ubuntu-latest
services:
redis: