Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions .github/workflows/publish-generator-fern-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Generators are registered within seed.yml, once their tests are passing
name: Publish CLI Generator

on:
push:
branches:
- main
paths:
- "generators/cli/versions.yml"
workflow_dispatch:
inputs:
version:
description: "The version of the generator to publish."
required: true
type: string

permissions: # Required for OIDC
id-token: write
contents: read

env:
DO_NOT_TRACK: "1"

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repo at current ref
uses: actions/checkout@v6
with:
ref: main
fetch-depth: 10
- name: automated publish
if: ${{ github.event_name == 'push' }}
uses: ./.github/actions/publish-generator
with:
generator-name: "cli"
version-file: "generators/cli/versions.yml"
fern-token: ${{ secrets.FERN_TOKEN }}
docker-pwd: ${{ secrets.FERN_API_DOCKERHUB_PASSWORD }}
- name: manual publish
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: ./.github/actions/publish-generator
with:
generator-name: "cli"
version: ${{ inputs.version }}
manual-trigger: "true"
fern-token: ${{ secrets.FERN_TOKEN }}
docker-pwd: ${{ secrets.FERN_API_DOCKERHUB_PASSWORD }}
2 changes: 2 additions & 0 deletions .github/workflows/release-software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- "generators/rust/sdk/changes/**"
- "generators/swift/sdk/changes/**"
- "generators/typescript/sdk/changes/**"
- "generators/cli/changes/**"
workflow_dispatch:
inputs:
software:
Expand All @@ -36,6 +37,7 @@ on:
- rust
- swift
- typescript
- cli-generator

# Prevent concurrent release runs to avoid git conflicts.
# NOTE: cancel-in-progress: false protects the running job, but GitHub still
Expand Down
51 changes: 47 additions & 4 deletions .github/workflows/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
swift-sdk: ${{ steps.create-dynamic-matrix.outputs.swift-sdk-test-matrix }}
rust-model: ${{ steps.create-dynamic-matrix.outputs.rust-model-test-matrix }}
rust-sdk: ${{ steps.create-dynamic-matrix.outputs.rust-sdk-test-matrix }}
cli: ${{ steps.create-dynamic-matrix.outputs.cli-test-matrix }}
benchmark-generators: ${{ steps.create-dynamic-matrix.outputs.benchmark-generators }}
benchmark-docs: ${{ steps.create-dynamic-matrix.outputs.benchmark-docs }}
steps:
Expand Down Expand Up @@ -847,6 +848,38 @@ jobs:
dockerhub-username: ${{ secrets.DOCKER_USERNAME_PUBLIC_READONLY }}
dockerhub-token: ${{ secrets.DOCKER_PASSWORD_PUBLIC_READONLY }}

cli:
runs-on: Seed
timeout-minutes: 15
needs: [setup, get-all-test-matrices]
if: >-
${{
(needs.get-all-test-matrices.outputs.cli != ''
&& github.event.pull_request.draft == false) || github.event_name == 'workflow_dispatch'
}}
strategy:
fail-fast: false
max-parallel: 15
matrix:
include: ${{ fromJSON(needs.get-all-test-matrices.outputs.cli) }}
steps:
- name: Checkout action file
uses: actions/checkout@v6
with:
sparse-checkout: |
.github/actions/run-seed-process

- name: Run All Seed Tests
uses: ./.github/actions/run-seed-process
with:
sdk-name: cli
generator-path: generators/cli
fixtures-to-run: ${{toJson(matrix.fixtures)}}
job-index: ${{ strategy.job-index }}
collect-metrics: ${{ needs.setup.outputs.post-metrics }}
dockerhub-username: ${{ secrets.DOCKER_USERNAME_PUBLIC_READONLY }}
dockerhub-token: ${{ secrets.DOCKER_PASSWORD_PUBLIC_READONLY }}

# SDK Generation Benchmarks — runs affected SDK generators against large public OAS specs.
# Uses --skip-scripts to measure generator-only time (no npm install/build/test noise).
# Baseline timings come from the nightly benchmark-baseline.yml workflow (via artifacts API).
Expand Down Expand Up @@ -1449,7 +1482,8 @@ jobs:
php-sdk,
swift-sdk,
rust-model,
rust-sdk
rust-sdk,
cli
]
if: >-
${{
Expand All @@ -1475,7 +1509,8 @@ jobs:
php-sdk,
swift-sdk,
rust-model,
rust-sdk
rust-sdk,
cli
]
outputs:
ruby-sdk-v2-passing: ${{ steps.report-results.outputs.ruby-sdk-v2-passing }}
Expand All @@ -1494,6 +1529,7 @@ jobs:
swift-sdk-passing: ${{ steps.report-results.outputs.swift-sdk-passing }}
rust-model-passing: ${{ steps.report-results.outputs.rust-model-passing }}
rust-sdk-passing: ${{ steps.report-results.outputs.rust-sdk-passing }}
cli-passing: ${{ steps.report-results.outputs.cli-passing }}
steps:
- name: Report ${{ matrix.job-name }} seed test results
id: report-results
Expand Down Expand Up @@ -1546,7 +1582,8 @@ jobs:
php-sdk,
swift-sdk,
rust-model,
rust-sdk
rust-sdk,
cli
]
outputs:
ruby-sdk-v2-total-fixtures-count: ${{ steps.extract-all-fixture-info.outputs.ruby-sdk-v2-total-fixtures-count }}
Expand Down Expand Up @@ -1613,6 +1650,10 @@ jobs:
rust-sdk-total-fixtures-count: ${{ steps.extract-all-fixture-info.outputs.rust-sdk-total-fixtures-count }}
rust-sdk-allowed-failures: ${{ steps.extract-all-fixture-info.outputs.rust-sdk-allowed-failures }}
rust-sdk-allowed-failures-count: ${{ steps.extract-all-fixture-info.outputs.rust-sdk-allowed-failures-count }}

cli-total-fixtures-count: ${{ steps.extract-all-fixture-info.outputs.cli-total-fixtures-count }}
cli-allowed-failures: ${{ steps.extract-all-fixture-info.outputs.cli-allowed-failures }}
cli-allowed-failures-count: ${{ steps.extract-all-fixture-info.outputs.cli-allowed-failures-count }}
steps:
- name: Checkout repo
uses: actions/checkout@v6
Expand Down Expand Up @@ -1680,6 +1721,7 @@ jobs:
swift-sdk,
rust-model,
rust-sdk,
cli,
collect-allowed-failures
]
if: ${{ always() && !cancelled() && needs.setup.outputs.post-metrics == 'true' }}
Expand All @@ -1703,7 +1745,8 @@ jobs:
php-sdk,
swift-sdk,
rust-model,
rust-sdk
rust-sdk,
cli
]
steps:
- name: Create Metrics Artifacts Info
Expand Down
Loading
Loading