-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/go-generator-timestamp-syntax-err
- Loading branch information
Showing
19,932 changed files
with
963,876 additions
and
120,028 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Cached Seed Generation | ||
description: Run seed generation with caching for a specific generator. | ||
|
||
inputs: | ||
generator-name: | ||
description: Generator to use (e.g., go-sdk, ruby-sdk) | ||
required: true | ||
generator-path: | ||
description: The path to the source code of the generator (e.g., generators/go, generators/ruby) | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Generate input hash | ||
id: hash | ||
shell: bash | ||
run: | | ||
HASH=$(./scripts/hash.sh \ | ||
packages/seed \ | ||
test-definitions \ | ||
packages/ir-sdk/fern/apis \ | ||
packages/cli/generation/ir-generator \ | ||
${{ inputs.generator-path }} \ | ||
seed/${{ inputs.generator-name }}/seed.yml \ | ||
--exclude versions.yml) | ||
echo "hash=${HASH}" >> $GITHUB_OUTPUT | ||
- name: Check cache | ||
id: cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: seed/${{ inputs.generator-name }} | ||
key: seed-${{ inputs.generator-name }}-${{ steps.hash.outputs.hash }} | ||
|
||
- name: Install | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: ./.github/actions/install | ||
|
||
- uses: bufbuild/[email protected] | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
with: | ||
github_token: ${{ github.token }} | ||
|
||
- uses: actions/setup-go@v5 | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
with: | ||
go-version: "stable" | ||
|
||
- name: Install protoc-gen-openapi | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: go install github.com/google/gnostic/cmd/[email protected] | ||
|
||
- name: Seed Test | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
shell: bash | ||
env: | ||
FORCE_COLOR: "2" | ||
run: | | ||
pnpm seed:local test --generator ${{ inputs.generator-name }} --parallel 16 | ||
- name: Validate results | ||
id: validate | ||
shell: bash | ||
run: | | ||
if git --no-pager diff --exit-code -- ":(exclude)seed/*/.mock/*"; then | ||
echo "Results are valid, saving to cache if not already." | ||
echo "valid=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "Changes detected in git-tracked files." | ||
exit 1 | ||
fi | ||
- name: Save cache | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: seed/${{ inputs.generator-name }} | ||
key: seed-${{ inputs.generator-name }}-${{ steps.hash.outputs.hash }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,10 @@ concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_TEAM: "buildwithfern" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
@@ -82,9 +86,6 @@ jobs: | |
- name: Install protoc-gen-openapi | ||
run: go install github.com/google/gnostic/cmd/[email protected] | ||
|
||
- name: Compile | ||
run: pnpm compile | ||
|
||
- name: Run tests | ||
run: pnpm test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
.github/workflows/publish-docs-parsers-fern-definition.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: publish-docs-parsers-fern-definition | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/actions/install | ||
|
||
- name: Install Fern | ||
run: npm install -g fern-api | ||
|
||
- name: Get current version and compute next version | ||
id: version | ||
run: | | ||
CURRENT_VERSION=$(npm view @fern-fern/docs-parsers-fern-definition version) | ||
# Split version into parts | ||
IFS='.' read -r major minor patch <<< "$CURRENT_VERSION" | ||
# Increment patch version | ||
NEW_VERSION="$major.$minor.$((patch + 1))" | ||
echo "next_version=$NEW_VERSION" >> $GITHUB_OUTPUT | ||
- name: Generate docs parsers | ||
env: | ||
FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | ||
run: | | ||
fern generate --api fern-definition --group docs-parsers --version ${{ steps.version.outputs.next_version }} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Publish @fern-api/snippets-core | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "The version of the library to publish." | ||
required: true | ||
type: string | ||
|
||
env: | ||
PACKAGE_NAME: "@fern-api/snippets-core" | ||
GITHUB_TOKEN: ${{ secrets.FERN_GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
if: ${{ inputs.version != null }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
|
||
- name: 📥 Install | ||
uses: ./.github/actions/install | ||
|
||
- uses: bufbuild/[email protected] | ||
with: | ||
github_token: ${{ github.token }} | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "stable" | ||
|
||
- name: Install protoc-gen-openapi | ||
run: go install github.com/google/gnostic/cmd/[email protected] | ||
|
||
- name: 🧪 Build | ||
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile | ||
|
||
- name: 🧪 Test | ||
run: pnpm --filter=${{ env.PACKAGE_NAME }} test | ||
|
||
- name: Publish @fern-api/snippets-core | ||
run: | | ||
cd packages/snippets/core | ||
pnpm --filter=${{ env.PACKAGE_NAME }} dist ${{ inputs.version }} | ||
cd dist | ||
echo "//registry.npmjs.org/:_authToken=${{ env.NPM_TOKEN }}" > ~/.npmrc | ||
npm publish --access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Publish @fern-api/typescript-dynamic-snippets | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "The version of the library to publish." | ||
required: true | ||
type: string | ||
|
||
env: | ||
PACKAGE_NAME: "@fern-api/typescript-dynamic-snippets" | ||
GITHUB_TOKEN: ${{ secrets.FERN_GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
if: ${{ inputs.version != null }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
|
||
- name: 📥 Install | ||
uses: ./.github/actions/install | ||
|
||
- uses: bufbuild/[email protected] | ||
with: | ||
github_token: ${{ github.token }} | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "stable" | ||
|
||
- name: Install protoc-gen-openapi | ||
run: go install github.com/google/gnostic/cmd/[email protected] | ||
|
||
- name: 🧪 Build | ||
run: pnpm --filter=${{ env.PACKAGE_NAME }} compile | ||
|
||
- name: 🧪 Test | ||
run: pnpm --filter=${{ env.PACKAGE_NAME }} test | ||
|
||
- name: Publish @fern-api/typescript-dynamic-snippets | ||
run: | | ||
cd generators/typescript-v2/dynamic-snippets | ||
pnpm --filter=${{ env.PACKAGE_NAME }} dist ${{ inputs.version }} | ||
cd dist | ||
echo "//registry.npmjs.org/:_authToken=${{ env.NPM_TOKEN }}" > ~/.npmrc | ||
npm publish --access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.