This repository has been archived by the owner on Nov 6, 2024. It is now read-only.
chore: remove pnp bc of bugs #4
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
name: seed | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_call: | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
outputs: | |
seed: ${{ steps.filter.outputs.seed }} | |
ruby: ${{ steps.filter.outputs.ruby }} | |
openapi: ${{ steps.filter.outputs.openapi }} | |
python: ${{ steps.filter.outputs.python }} | |
postman: ${{ steps.filter.outputs.postman }} | |
java: ${{ steps.filter.outputs.java }} | |
typescript: ${{ steps.filter.outputs.ts }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
seed: | |
- 'packages/seed/**' | |
- 'test-definitions/**' | |
ruby: 'generators/ruby/**' | |
openapi: 'generators/openapi/**' | |
python: 'generators/python/**' | |
postman: 'generators/postman/**' | |
java: 'generators/java/**' | |
typescript: 'generators/typescript/**' | |
ruby-model: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.ruby == 'true' || needs.changes.outputs.seed == 'true' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Install Seed | |
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 8 | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
pydantic-model: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.python == 'true' || needs.changes.outputs.seed == 'true' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Yarn Install | |
run: yarn install | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install Dependencies | |
working-directory: ./generators/python | |
run: poetry install | |
- name: Seed Test | |
run: | | |
yarn seed:local test --workspace pydantic --parallel 8 | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
python-sdk: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.python == 'true' || needs.changes.outputs.seed == 'true' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Yarn Install | |
run: yarn install | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install Dependencies | |
working-directory: ./generators/python | |
run: poetry install | |
- name: Seed Test | |
run: | | |
yarn seed:local test --workspace python-sdk --parallel 8 | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
fastapi: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.python == 'true' || needs.changes.outputs.seed == 'true' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Yarn Install | |
run: yarn install | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install Dependencies | |
working-directory: ./generators/python | |
run: poetry install | |
- name: Seed Test | |
run: | | |
yarn seed:local test --workspace fastapi --parallel 8 | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
openapi: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.openapi == 'true' || needs.changes.outputs.seed == 'true' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Yarn Install | |
run: yarn install | |
- name: Seed Test | |
run: | | |
yarn seed:local test --workspace openapi --parallel 8 | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
postman: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.postman == 'true' || needs.changes.outputs.seed == 'true' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Yarn Install | |
run: yarn install | |
- name: Seed Test | |
run: | | |
yarn seed:local test --workspace postman --parallel 8 | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
java-sdk: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.java == 'true' || needs.changes.outputs.seed == 'true' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Yarn Install | |
run: yarn install | |
- name: Seed Test | |
run: | | |
yarn seed:local test --workspace java-sdk --parallel 8 | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
java-model: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.java == 'true' || needs.changes.outputs.seed == 'true' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Yarn Install | |
run: yarn install | |
- name: Seed Test | |
run: | | |
yarn seed:local test --workspace java-model --parallel 8 | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
java-spring: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.java == 'true' || needs.changes.outputs.seed == 'true' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Yarn Install | |
run: yarn install | |
- name: Seed Test | |
run: | | |
yarn seed:local test --workspace java-spring --parallel 8 | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
typescript-sdk: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.typescript == 'true' || needs.changes.outputs.seed == 'true' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Yarn Install | |
run: yarn install | |
- name: Seed Test | |
run: | | |
yarn seed:local test --workspace ts-sdk --parallel 6 | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code | |
typescript-express: | |
runs-on: ubuntu-latest | |
needs: changes | |
if: ${{ needs.changes.outputs.typescript == 'true' || needs.changes.outputs.seed == 'true' }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
- name: Yarn Install | |
run: yarn install | |
- name: Seed Test | |
run: | | |
yarn seed:local test --workspace ts-express --parallel 6 | |
- name: Ensure no changes to git-tracked files | |
run: git --no-pager diff --exit-code |