Skip to content

Commit

Permalink
Merge branch 'main' into amckinney/snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
amckinney committed Feb 22, 2024
2 parents a08c8a1 + a4e45c5 commit 05d187b
Show file tree
Hide file tree
Showing 1,812 changed files with 292,644 additions and 278,467 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ generated
bundle.c?js
.pnp*
packages/ir-sdk/**
packages/cli/openapi-ir-sdk/**
packages/seed/**
generators/typescript/utils/core-utilities/**
seed/**

docker/seed/**
74 changes: 74 additions & 0 deletions .github/workflows/build-seed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build seed containers

on:
push:
branches:
- main
workflow_dispatch:

# Cancel previous workflows on previous push
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
python:
- 'docker/seed/Dockerfile.python'
- 'generators/python/poetry.lock'
- '.github/workflows/build-seed.yml'
ts:
- 'docker/seed/Dockerfile.ts'
- '.github/workflows/build-seed.yml'
java:
- 'docker/seed/Dockerfile.java'
- '.github/workflows/build-seed.yml'
build-container:
strategy:
matrix:
# Parse JSON array containing names of all filters matching any of changed files
# e.g. ['package1', 'package2'] if both package folders contains changes
package: ${{ fromJSON(needs.changes.outputs.packages) }}
runs-on: ubuntu-latest
needs: changes
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: fernapi
password: ${{ secrets.FERN_API_DOCKERHUB_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: fernapi/${{ matrix.package }}-seed
tags: |
type=sha
latest
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/seed/Dockerfile.${{ matrix.package }}
push: true
# use short SHA if modded, or just use latest if nothing changed
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion .github/workflows/ir-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ir
name: IR Check

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ir-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ir-publish
name: IR Publish

on:
workflow_dispatch:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/openapi-ir-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: OpenAPI IR Check

on:
workflow_dispatch:
pull_request:
paths:
- "packages/cli/openapi-ir-sdk/fern/**"
branches:
- main
push:
paths:
- "packages/cli/openapi-ir-sdk/fern/**"
branches:
- main

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Fern
run: npm install -g fern-api

- name: Check IR Definitions
run: |
cd packages/cli/openapi-ir-sdk
fern check
- name: Check IR Definitions
env:
FERN_TOKEN: dummy
run: |
cd packages/cli/openapi-ir-sdk
yarn generate
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
39 changes: 20 additions & 19 deletions .github/workflows/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
with:
filters: |
seed:
- '.github/workflows/seed.yml'
- 'packages/seed/**'
- 'test-definitions/**'
ruby: 'generators/ruby/**'
Expand All @@ -58,15 +59,15 @@ jobs:

- name: Install Seed
env:
FORCE_COLOR: "2"
FORCE_COLOR: "2"
run: npm install -g @fern-api/seed-cli

- name: Yarn Install
run: yarn install

- name: Seed Test
run: |
yarn seed:local test --workspace ruby-model --parallel 16
yarn seed:local test --workspace ruby-model
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand All @@ -84,17 +85,17 @@ jobs:
node-version: 18
cache: "yarn"

- name: Install Seed
- name: Install Seed
run: npm install -g @fern-api/seed-cli

- name: Yarn Install
run: yarn install

- name: Seed Test
env:
FORCE_COLOR: "2"
FORCE_COLOR: "2"
run: |
yarn seed:local test --workspace ruby-sdk --parallel 16
yarn seed:local test --workspace ruby-sdk
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand Down Expand Up @@ -124,9 +125,9 @@ jobs:

- name: Seed Test
env:
FORCE_COLOR: "2"
FORCE_COLOR: "2"
run: |
yarn seed:local test --workspace pydantic --parallel 16
yarn seed:local test --workspace pydantic
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand Down Expand Up @@ -156,9 +157,9 @@ jobs:

- name: Seed Test
env:
FORCE_COLOR: "2"
FORCE_COLOR: "2"
run: |
yarn seed:local test --workspace python-sdk --parallel 16
yarn seed:local test --workspace python-sdk --parallel 10
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand Down Expand Up @@ -188,9 +189,9 @@ jobs:

- name: Seed Test
env:
FORCE_COLOR: "2"
FORCE_COLOR: "2"
run: |
yarn seed:local test --workspace fastapi --parallel 16
yarn seed:local test --workspace fastapi
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand All @@ -215,7 +216,7 @@ jobs:
env:
FORCE_COLOR: "2"
run: |
yarn seed:local test --workspace openapi --parallel 16
yarn seed:local test --workspace openapi
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand All @@ -240,7 +241,7 @@ jobs:
env:
FORCE_COLOR: "2"
run: |
yarn seed:local test --workspace postman --parallel 16
yarn seed:local test --workspace postman
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand All @@ -265,7 +266,7 @@ jobs:
env:
FORCE_COLOR: "2"
run: |
yarn seed:local test --workspace java-sdk --parallel 16
yarn seed:local test --workspace java-sdk --parallel 10
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand All @@ -290,7 +291,7 @@ jobs:
env:
FORCE_COLOR: "2"
run: |
yarn seed:local test --workspace java-model --parallel 16
yarn seed:local test --workspace java-model --parallel 10
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand All @@ -315,7 +316,7 @@ jobs:
env:
FORCE_COLOR: "2"
run: |
yarn seed:local test --workspace java-spring --parallel 16
yarn seed:local test --workspace java-spring
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand All @@ -338,9 +339,9 @@ jobs:

- name: Seed Test
env:
FORCE_COLOR: "2"
FORCE_COLOR: "2"
run: |
yarn seed:local test --workspace ts-sdk --parallel 16
yarn seed:local test --workspace ts-sdk
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand All @@ -365,7 +366,7 @@ jobs:
env:
FORCE_COLOR: "2"
run: |
yarn seed:local test --workspace ts-express --parallel 16
yarn seed:local test --workspace ts-express --parallel 1
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand Down
Loading

0 comments on commit 05d187b

Please sign in to comment.