Skip to content

Commit

Permalink
(internal): pnpm migration (#4261)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Aug 12, 2024
1 parent 9d5ad51 commit 35bbcab
Show file tree
Hide file tree
Showing 1,152 changed files with 2,057,620 additions and 45,082 deletions.
21 changes: 21 additions & 0 deletions .github/actions/install/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Install Repo
description: Install the ts toolchain and dependencies

runs:
using: "composite"

steps:
- name: ⎔ Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.4.0

- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

- name: 📥 Install dependencies
shell: bash
run: pnpm install
83 changes: 27 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: ci
on:
push:
paths:
- ".pnp.cjs"
- "yarn.lock"
- "pnpm-lock.yaml"
- "packages/**"
# IR snapshot tests run on test definitions
- "test-definitions/**"
Expand All @@ -19,8 +18,7 @@ on:
- main
pull_request:
paths:
- ".pnp.cjs"
- "yarn.lock"
- "pnpm-lock.yaml"
- "packages/**"
# IR snapshot tests run on test definitions
- "test-definitions/**"
Expand All @@ -46,28 +44,20 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install
run: yarn install

- name: Lint Monorepo
run: yarn lint:monorepo
uses: ./.github/actions/install

- name: Check dependencies
run: yarn depcheck
run: pnpm depcheck

- name: Lint
run: yarn lint:style
run: pnpm lint:style

- name: generate (dev) JSON Schema
run: yarn generate-json-schema:dev
# - name: generate (dev) JSON Schema
# run: pnpm generate-json-schema:dev

- name: Format
run: yarn format:check
run: pnpm format:check

- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand All @@ -78,47 +68,32 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install
run: yarn install
uses: ./.github/actions/install

- name: compile
run: yarn compile
- name: Compile
run: pnpm compile

eslint:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install
run: yarn install
uses: ./.github/actions/install

- name: lint:eslint
run: yarn lint:eslint
run: pnpm lint:eslint

test:
runs-on: Test
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install
run: yarn install
uses: ./.github/actions/install

- uses: bufbuild/buf-setup-action@v1.34.0
with:
Expand All @@ -131,8 +106,11 @@ jobs:
- name: Install protoc-gen-openapi
run: go install github.com/google/gnostic/cmd/protoc-gen-openapi@v0.7.0

- name: Compile
run: pnpm compile

- name: Run tests
run: yarn test --maxWorkers 15 --ci --silent
run: pnpm test

- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand All @@ -143,19 +121,17 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install
run: yarn install
uses: ./.github/actions/install

- name: Compile
run: pnpm compile

- name: Run ETE tests
env:
FERN_ORG_TOKEN_DEV: ${{ secrets.FERN_ORG_TOKEN_DEV }}
run: |
FERN_TOKEN=${{ secrets.FERN_ORG_TOKEN_DEV }} yarn test:ete
FERN_TOKEN=${{ secrets.FERN_ORG_TOKEN_DEV }} pnpm test:ete
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
Expand All @@ -168,13 +144,8 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install
run: yarn install
uses: ./.github/actions/install

- name: Check API definition is valid
env:
Expand All @@ -183,8 +154,8 @@ jobs:
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
run: |
yarn workspace @fern-api/cli dist:cli:dev
cli_path="$(yarn workspace @fern-api/cli bin fern:dev)"
pnpm --filter @fern-api/cli dist:cli:dev
cli_path="./packages/cli/cli/dist/dev/bundle.cjs"
./scripts/live-test.sh "$cli_path" "$FERN_ORG_TOKEN_DEV"
changes:
Expand All @@ -209,7 +180,7 @@ jobs:
uses: actions/checkout@v4

- name: Install
run: yarn install
uses: ./.github/actions/install

- name: Load NVM
run: |
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/fern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Install
run: yarn install
uses: ./.github/actions/install

- name: Check API definition is valid
env:
Expand All @@ -30,7 +25,7 @@ jobs:
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
run: |
yarn workspace @fern-api/cli dist:cli:prod
cli_path="$(yarn workspace @fern-api/cli bin fern:prod)"
pnpm --filter @fern-api/cli dist:cli:prod
cli_path="$(pnpm --filter @fern-api/cli bin fern:prod)"
node $cli_path check
2 changes: 1 addition & 1 deletion .github/workflows/ir-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
FERN_TOKEN: dummy
run: |
cd packages/ir-sdk
yarn generate
pnpm generate
- name: Ensure no changes to git-tracked files
run: git --no-pager diff --exit-code
6 changes: 3 additions & 3 deletions .github/workflows/publish-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Update yarn.lock with new versions
run: yarn
- name: Compile
run: yarn compile
run: pnpm compile
- name: Publish seed CLI
run: yarn workspace @fern-api/seed-cli publish:cli
- name: Publish fern-api-dev CLI
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Update yarn.lock with new versions
run: yarn
- name: Compile
run: yarn compile
run: pnpm compile
- name: Publish fern-api-dev CLI
run: yarn workspace @fern-api/cli publish:cli:dev --access restricted
- name: Publish seed CLI
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
- name: Update yarn.lock with new versions
run: yarn
- name: Compile
run: yarn compile
run: pnpm compile
- name: Publish fern-api-dev CLI
run: yarn workspace @fern-api/cli publish:cli:dev --access restricted
- name: Publish seed CLI
Expand Down
Loading

0 comments on commit 35bbcab

Please sign in to comment.