Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/publish-generator/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ runs:
shell: bash
run: |
echo "Building seed CLI once with Turbo caching..."
pnpm turbo run dist:cli --filter=@fern-api/seed-cli
pnpm seed:build

- name: Run publish (auto)
if: inputs.manual-trigger == 'false'
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/ci-dynamic-snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=@fern-api/typescript-dynamic-snippets compile
run: pnpm turbo run compile --filter=@fern-api/typescript-dynamic-snippets

- name: 🧪 Test
run: pnpm --filter=@fern-api/typescript-dynamic-snippets test
run: pnpm turbo run test --filter=@fern-api/typescript-dynamic-snippets

test-python:
runs-on: ubuntu-latest
Expand All @@ -71,10 +71,10 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=@fern-api/python-dynamic-snippets compile
run: pnpm turbo run compile --filter=@fern-api/python-dynamic-snippets

- name: 🧪 Test
run: pnpm --filter=@fern-api/python-dynamic-snippets test
run: pnpm turbo run test --filter=@fern-api/python-dynamic-snippets

test-csharp:
runs-on: ubuntu-latest
Expand All @@ -101,10 +101,10 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=@fern-api/csharp-dynamic-snippets compile
run: pnpm turbo run compile --filter=@fern-api/csharp-dynamic-snippets

- name: 🧪 Test
run: pnpm --filter=@fern-api/csharp-dynamic-snippets test
run: pnpm turbo run test --filter=@fern-api/csharp-dynamic-snippets

test-go:
runs-on: ubuntu-latest
Expand All @@ -131,10 +131,10 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=@fern-api/go-dynamic-snippets compile
run: pnpm turbo run compile --filter=@fern-api/go-dynamic-snippets

- name: 🧪 Test
run: pnpm --filter=@fern-api/go-dynamic-snippets test
run: pnpm turbo run test --filter=@fern-api/go-dynamic-snippets

test-ruby:
runs-on: ubuntu-latest
Expand All @@ -161,10 +161,10 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=@fern-api/ruby-dynamic-snippets compile
run: pnpm turbo run compile --filter=@fern-api/ruby-dynamic-snippets

- name: 🧪 Test
run: pnpm --filter=@fern-api/ruby-dynamic-snippets test
run: pnpm turbo run test --filter=@fern-api/ruby-dynamic-snippets

test-php:
runs-on: ubuntu-latest
Expand All @@ -191,10 +191,10 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=@fern-api/php-dynamic-snippets compile
run: pnpm turbo run compile --filter=@fern-api/php-dynamic-snippets

- name: 🧪 Test
run: pnpm --filter=@fern-api/php-dynamic-snippets test
run: pnpm turbo run test --filter=@fern-api/php-dynamic-snippets

test-swift:
runs-on: ubuntu-latest
Expand All @@ -221,10 +221,10 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=@fern-api/swift-dynamic-snippets compile
run: pnpm turbo run compile --filter=@fern-api/swift-dynamic-snippets

- name: 🧪 Test
run: pnpm --filter=@fern-api/swift-dynamic-snippets test
run: pnpm turbo run test --filter=@fern-api/swift-dynamic-snippets

test-java:
runs-on: ubuntu-latest
Expand All @@ -251,7 +251,7 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=@fern-api/java-dynamic-snippets compile
run: pnpm turbo run compile --filter=@fern-api/java-dynamic-snippets

- name: 🧪 Test
run: pnpm --filter=@fern-api/java-dynamic-snippets test
run: pnpm turbo run test --filter=@fern-api/java-dynamic-snippets
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ jobs:
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
run: |
pnpm --filter @fern-api/cli dist:cli:dev
pnpm turbo run dist:cli:dev --filter @fern-api/cli
cli_path="$(pwd)/packages/cli/cli/dist/dev/cli.cjs"
./scripts/live-test.sh "$cli_path" "$FERN_ORG_TOKEN_DEV"

Expand All @@ -249,7 +249,7 @@ jobs:
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
run: |
pnpm --filter @fern-api/cli dist:cli:dev
pnpm turbo run dist:cli:dev --filter @fern-api/cli
$cliPath = Join-Path $env:GITHUB_WORKSPACE "packages\cli\cli\dist\dev\cli.cjs"
if (-not (Test-Path $cliPath)) {
Write-Error "CLI path does not exist: $cliPath"
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
run: |
pnpm --filter @fern-api/cli dist:cli:dev
pnpm turbo run dist:cli:dev --filter @fern-api/cli
$cliPath = Join-Path $env:GITHUB_WORKSPACE "packages\cli\cli\dist\dev\cli.cjs"
if (-not (Test-Path $cliPath)) {
Write-Error "CLI path does not exist: $cliPath"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/definitions-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
run: |
pnpm --filter @fern-api/cli dist:cli:prod
pnpm turbo run dist:cli:prod --filter @fern-api/cli
cli_path="$(pwd)/packages/cli/cli/dist/prod/cli.cjs"
node $cli_path check
2 changes: 1 addition & 1 deletion .github/workflows/publish-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
run: |
pnpm --filter @fern-api/cli dist:cli:prod
pnpm turbo run dist:cli:prod --filter @fern-api/cli
cli_path="$(pwd)/packages/cli/cli/dist/prod/cli.cjs"
./scripts/live-test.sh "$cli_path" "$FERN_TOKEN" "true"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-csharp-dynamic-snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile
run: pnpm turbo run compile --filter=${{ env.PACKAGE_NAME }}

- name: 🧪 Test
run: pnpm --filter=${{ env.PACKAGE_NAME }} test
run: pnpm turbo run test --filter=${{ env.PACKAGE_NAME }}

- name: Publish @fern-api/csharp-dynamic-snippets
run: |
cd generators/csharp/dynamic-snippets
pnpm --filter=${{ env.PACKAGE_NAME }} dist ${{ steps.ver.outputs.version }}
pnpm turbo run dist --filter=${{ env.PACKAGE_NAME }} -- ${{ steps.ver.outputs.version }}
cd dist
npm publish --access public --tag latest

Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/publish-generator-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,15 @@ jobs:
- name: Update npm
run: npm install -g npm@latest

- name: 🧪 Build and test
- name: Build CLI
env:
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
run: pnpm turbo compile test --filter=${{ env.PACKAGE_NAME }}
run: pnpm turbo run dist:cli --filter=${{ env.PACKAGE_NAME }}

- name: Test
env:
GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
run: pnpm turbo run test --filter=${{ env.PACKAGE_NAME }}

- name: Setup Node for npm publish
uses: actions/setup-node@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-go-dynamic-snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile
run: pnpm turbo run compile --filter=${{ env.PACKAGE_NAME }}

- name: 🧪 Test
run: pnpm --filter=${{ env.PACKAGE_NAME }} test
run: pnpm turbo run test --filter=${{ env.PACKAGE_NAME }}

- name: Publish @fern-api/go-dynamic-snippets
run: |
cd generators/go-v2/dynamic-snippets
pnpm --filter=${{ env.PACKAGE_NAME }} dist ${{ steps.ver.outputs.version }}
pnpm turbo run dist --filter=${{ env.PACKAGE_NAME }} -- ${{ steps.ver.outputs.version }}
cd dist
npm publish --access public --tag latest

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-java-dynamic-snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile
run: pnpm turbo run compile --filter=${{ env.PACKAGE_NAME }}

- name: 🧪 Test
run: pnpm --filter=${{ env.PACKAGE_NAME }} test
run: pnpm turbo run test --filter=${{ env.PACKAGE_NAME }}

- name: Publish @fern-api/java-dynamic-snippets
run: |
cd generators/java-v2/dynamic-snippets
pnpm --filter=${{ env.PACKAGE_NAME }} dist ${{ steps.ver.outputs.version }}
pnpm turbo run dist --filter=${{ env.PACKAGE_NAME }} -- ${{ steps.ver.outputs.version }}
cd dist
npm publish --access public --tag latest

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-php-dynamic-snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile
run: pnpm turbo run compile --filter=${{ env.PACKAGE_NAME }}

- name: 🧪 Test
run: pnpm --filter=${{ env.PACKAGE_NAME }} test
run: pnpm turbo run test --filter=${{ env.PACKAGE_NAME }}

- name: Publish @fern-api/php-dynamic-snippets
run: |
cd generators/php/dynamic-snippets
pnpm --filter=${{ env.PACKAGE_NAME }} dist ${{ steps.ver.outputs.version }}
pnpm turbo run dist --filter=${{ env.PACKAGE_NAME }} -- ${{ steps.ver.outputs.version }}
cd dist
npm publish --access public --tag latest

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-python-dynamic-snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile
run: pnpm turbo run compile --filter=${{ env.PACKAGE_NAME }}

- name: 🧪 Test
run: pnpm --filter=${{ env.PACKAGE_NAME }} test
run: pnpm turbo run test --filter=${{ env.PACKAGE_NAME }}

- name: Publish @fern-api/python-dynamic-snippets
run: |
cd generators/python-v2/dynamic-snippets
pnpm --filter=${{ env.PACKAGE_NAME }} dist ${{ steps.ver.outputs.version }}
pnpm turbo run dist --filter=${{ env.PACKAGE_NAME }} -- ${{ steps.ver.outputs.version }}
cd dist
npm publish --access public -tag latest
npm publish --access public --tag latest

- name: Update fern-platform dependency
uses: ./.github/actions/update-fern-platform-dependency
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-ruby-dynamic-snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile
run: pnpm turbo run compile --filter=${{ env.PACKAGE_NAME }}

- name: 🧪 Test
run: pnpm --filter=${{ env.PACKAGE_NAME }} test
run: pnpm turbo run test --filter=${{ env.PACKAGE_NAME }}

- name: Publish @fern-api/ruby-dynamic-snippets
run: |
cd generators/ruby-v2/dynamic-snippets
pnpm --filter=${{ env.PACKAGE_NAME }} dist ${{ steps.ver.outputs.version }}
pnpm turbo run dist --filter=${{ env.PACKAGE_NAME }} -- ${{ steps.ver.outputs.version }}
cd dist
npm publish --access public --tag latest

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-snippets-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile
run: pnpm turbo run compile --filter=${{ env.PACKAGE_NAME }}

- name: 🧪 Test
run: pnpm --filter=${{ env.PACKAGE_NAME }} test
run: pnpm turbo run test --filter=${{ env.PACKAGE_NAME }}

- name: Publish @fern-api/snippets-core
run: |
cd packages/snippets/core
pnpm --filter=${{ env.PACKAGE_NAME }} dist ${{ inputs.version }}
pnpm turbo run dist --filter=${{ env.PACKAGE_NAME }} -- ${{ inputs.version }}
cd dist
npm publish --access public --tag latest
6 changes: 3 additions & 3 deletions .github/workflows/publish-swift-dynamic-snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile
run: pnpm turbo run compile --filter=${{ env.PACKAGE_NAME }}

- name: 🧪 Test
run: pnpm --filter=${{ env.PACKAGE_NAME }} test
run: pnpm turbo run test --filter=${{ env.PACKAGE_NAME }}

- name: Publish @fern-api/swift-dynamic-snippets
run: |
cd generators/swift/dynamic-snippets
pnpm --filter=${{ env.PACKAGE_NAME }} dist ${{ steps.ver.outputs.version }}
pnpm turbo run dist --filter=${{ env.PACKAGE_NAME }} -- ${{ steps.ver.outputs.version }}
cd dist
npm publish --access public --tag latest

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-ts-dynamic-snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ jobs:
run: go install github.com/fern-api/protoc-gen-openapi/cmd/protoc-gen-openapi@latest

- name: 🧪 Build
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile
run: pnpm turbo run compile --filter=${{ env.PACKAGE_NAME }}

- name: 🧪 Test
run: pnpm --filter=${{ env.PACKAGE_NAME }} test
run: pnpm turbo run test --filter=${{ env.PACKAGE_NAME }}

- name: Publish @fern-api/typescript-dynamic-snippets
run: |
cd generators/typescript-v2/dynamic-snippets
pnpm --filter=${{ env.PACKAGE_NAME }} dist ${{ steps.ver.outputs.version }}
pnpm turbo run dist --filter=${{ env.PACKAGE_NAME }} -- ${{ steps.ver.outputs.version }}
cd dist
npm publish --access public --tag latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sdk-ete-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

- name: Build PHP SDK generator
if: ${{ inputs.language == 'php' || github.event_name == 'pull_request' }}
run: pnpm --filter @fern-api/php-sdk dist:cli
run: pnpm turbo run dist:cli --filter @fern-api/php-sdk

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
env:
FORCE_COLOR: "2"
run: |
pnpm --filter @fern-api/cli dist:cli:dev
pnpm turbo run dist:cli:dev --filter @fern-api/cli
cli_path="$(pwd)/packages/cli/cli/dist/dev/cli.cjs"
cd test-definitions
FERN_NO_VERSION_REDIRECTION=true node $cli_path check
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/validate-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ jobs:
- name: Install
uses: ./.github/actions/install

- name: Compile
run: pnpm exec turbo compile '--filter=@fern-api/seed-cli'

- name: Seed Build
run: pnpm seed:build

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ pnpm install

To compile all the packages in this monorepo, run `pnpm compile`.

To compile a single package, filter to the relevant package: `pnpm --filter @fern-api/openapi-parser compile`.
To compile a single package, filter to the relevant package: `pnpm turbo run compile --filter @fern-api/openapi-parser`.

### Step 3: Testing

This repo contains both unit tests and integration (end-to-end) tests.

To run all the unit tests: `pnpm test`.

To run unit tests for a single package: `pnpm --filter @fern-api/openapi-parser test`
To run unit tests for a single package: `pnpm turbo run test --filter @fern-api/openapi-parser`

To run the integration tests: `pnpm test:ete`.

Expand Down
Loading
Loading