Upgrade fern and apply migrations #88
Workflow file for this run
This file contains hidden or 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: Preview SDKs | |
| on: | |
| pull_request: | |
| paths: | |
| - 'fern/**' | |
| jobs: | |
| preview-typescript: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| - name: Download Fern | |
| run: npm install -g fern-api | |
| - name: Generate Preview | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| run: | | |
| fern generate --group ts-sdk --preview --log-level debug | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| package_json_file: fern/.preview/fern-typescript-sdk/package.json | |
| - name: Compile | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| cd fern/.preview/fern-typescript-sdk | |
| pnpm install --frozen-lockfile | |
| pnpm build | |
| preview-java: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Java | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: "11" | |
| architecture: x64 | |
| - name: Download Fern | |
| run: npm install -g fern-api | |
| - name: Generate Preview | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| run: | | |
| fern generate --group java-sdk --preview --log-level debug | |
| - name: Build | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| run: | | |
| cd fern/.preview/fern-java-sdk | |
| ./gradlew assemble | |
| preview-python: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.9 | |
| - name: Bootstrap poetry | |
| run: | | |
| curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 | |
| - name: Download Fern | |
| run: npm install -g fern-api | |
| - name: Generate Preview | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| run: | | |
| fern generate --group python-sdk --preview --log-level debug | |
| - name: Build | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| run: | | |
| cd fern/.preview/fern-python-sdk | |
| poetry install | |
| poetry run mypy . | |
| preview-php: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.1" | |
| - name: Download Fern | |
| run: npm install -g fern-api | |
| - name: Generate Preview | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| run: | | |
| fern generate --group php-sdk --preview --log-level debug | |
| - name: Build | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| run: | | |
| cd fern/.preview/fern-php-sdk | |
| composer install | |
| composer build | |
| composer analyze |