Skip to content

Commit

Permalink
chore: rename mentions of yarn => pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge authored and rexxars committed Feb 14, 2024
1 parent 64203be commit 5a65aad
Show file tree
Hide file tree
Showing 40 changed files with 167 additions and 170 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cli-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,25 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build CLI
run: yarn build:cli # Needed for CLI tests
run: pnpm build:cli # Needed for CLI tests

- name: Test
id: test
run: |
node -v
npm -v
yarn test --silent --selectProjects=@sanity/cli
pnpm test --silent --selectProjects=@sanity/cli
env:
# Update token in github and change below to ${{ secrets.SANITY_CI_CLI_AUTH_TOKEN }} after merge to next
SANITY_CI_CLI_AUTH_TOKEN_STAGING: ${{ secrets.SANITY_CI_CLI_AUTH_TOKEN_STAGING }}
6 changes: 3 additions & 3 deletions .github/workflows/depCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Check for unused/missing dependencies
id: depcheck
run: yarn depcheck
run: pnpm depcheck
env:
NODE_OPTIONS: --max_old_space_size=8192
12 changes: 6 additions & 6 deletions .github/workflows/docReport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build packages
run: yarn build
run: pnpm build
env:
NODE_OPTIONS: --max_old_space_size=8192

Expand All @@ -45,21 +45,21 @@ jobs:
env:
DOCS_REPORT_TOKEN: ${{ secrets.DOCS_REPORT_DATASET_TOKEN }}
DOCS_REPORT_DATASET: ${{ github.ref == 'refs/heads/current' && 'production' || 'next'}}
run: yarn docs:report:create
run: pnpm docs:report:create

- name: Create Docs Report on PR
if: ${{ github.event_name == 'pull_request' }}
env:
DOCS_REPORT_TOKEN: ${{ secrets.DOCS_REPORT_DATASET_TOKEN }}
DOCS_REPORT_DATASET: pr-${{ github.event.number }}
run: yarn docs:report:create
run: pnpm docs:report:create

- name: Compare Docs Coverage on PR
if: ${{ github.event_name == 'pull_request' }}
env:
DOCS_REPORT_TOKEN: ${{ secrets.DOCS_REPORT_DATASET_TOKEN }}
DOCS_REPORT_DATASET: pr-${{ github.event.number }}
run: yarn docs:report
run: pnpm docs:report

- name: PR comment with report
uses: thollander/actions-comment-pull-request@1d3973dc4b8e1399c0620d3f2b1aa5e795465308 # v2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/e2e-ct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --immutable --immutable-cache --check-cache
run: pnpm install --frozen-lockfile

- name: Store Playwright's Version
run: |
Expand All @@ -48,9 +48,9 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Build CLI
run: yarn build:cli # Needed for CLI tests
run: pnpm build:cli # Needed for CLI tests
- name: Run end-to-end tests
run: yarn workspace sanity test:ct
run: pnpm --filter sanity test:ct
env:
NODE_OPTIONS: --max_old_space_size=8192
- name: Get Current Job Log URL
Expand All @@ -63,7 +63,7 @@ jobs:
- name: Parse playwright report
id: parse-playwright-report
if: always()
run: yarn workspace sanity write:playwright-report-as-pr-comment
run: pnpm --filter sanity write:playwright-report-as-pr-comment
env:
GITHUB_WORKFLOW_URL: '${{ steps.job_html_url.outputs.html_url }}'
- name: PR comment with report
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e-pte.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Store Playwright's Version
run: |
Expand All @@ -60,4 +60,4 @@ jobs:
run: npx playwright install --with-deps

- name: Run end-to-end tests
run: cd packages/@sanity/portable-text-editor && yarn test:e2e --silent --shard=${{ matrix.shardIndex}}/${{ matrix.shardTotal }}
run: cd packages/@sanity/portable-text-editor && pnpm test:e2e --silent --shard=${{ matrix.shardIndex}}/${{ matrix.shardTotal }}
22 changes: 11 additions & 11 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Store Playwright's Version
run: |
Expand All @@ -58,7 +58,7 @@ jobs:
run: npx playwright install --with-deps

- name: Build CLI
run: yarn build:cli # Needed for CLI tests
run: pnpm build:cli # Needed for CLI tests

- name: Build E2E test studio on next
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
Expand All @@ -69,7 +69,7 @@ jobs:
SANITY_E2E_SESSION_TOKEN: ${{ secrets.SANITY_E2E_SESSION_TOKEN_NEW }}
SANITY_E2E_PROJECT_ID: ${{ secrets.SANITY_E2E_PROJECT_ID }}
SANITY_E2E_DATASET: ${{ secrets.SANITY_E2E_DATASET }}
run: yarn e2e:setup && yarn e2e:build
run: pnpm e2e:setup && pnpm e2e:build

- name: Build E2E test studio on PR
if: ${{ github.event_name == 'pull_request' }}
Expand All @@ -80,7 +80,7 @@ jobs:
SANITY_E2E_SESSION_TOKEN: ${{ secrets.SANITY_E2E_SESSION_TOKEN_NEW }}
SANITY_E2E_PROJECT_ID: ${{ secrets.SANITY_E2E_PROJECT_ID }}
SANITY_E2E_DATASET: pr-${{ matrix.project }}-${{ github.event.number }}
run: yarn e2e:setup && yarn e2e:build
run: pnpm e2e:setup && pnpm e2e:build

# Caches build from either PR or next
- name: Cache build
Expand Down Expand Up @@ -121,15 +121,15 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Store Playwright's Version
run: |
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
SANITY_E2E_SESSION_TOKEN: ${{ secrets.SANITY_E2E_SESSION_TOKEN_NEW }}
SANITY_E2E_PROJECT_ID: ${{ secrets.SANITY_E2E_PROJECT_ID }}
SANITY_E2E_DATASET: ${{ secrets.SANITY_E2E_DATASET }}
run: yarn test:e2e --project ${{ matrix.project }} --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
run: npx playwright test --project ${{ matrix.project }} --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

- name: Run E2E tests on PR
if: ${{ github.event_name == 'pull_request' }}
Expand All @@ -185,7 +185,7 @@ jobs:
SANITY_E2E_SESSION_TOKEN: ${{ secrets.SANITY_E2E_SESSION_TOKEN_NEW }}
SANITY_E2E_PROJECT_ID: ${{ secrets.SANITY_E2E_PROJECT_ID }}
SANITY_E2E_DATASET: pr-${{ matrix.project }}-${{ github.event.number }}
run: yarn test:e2e --project ${{ matrix.project }} --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
run: npx playwright test --project ${{ matrix.project }} --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

- uses: actions/upload-artifact@v3
if: always()
Expand All @@ -210,15 +210,15 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Download blob reports from Github Actions Artifacts
uses: actions/download-artifact@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/etl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build packages
run: yarn build
run: pnpm build
env:
NODE_OPTIONS: --max_old_space_size=8192

Expand All @@ -45,4 +45,4 @@ jobs:
EXTRACT_SANITY_PROJECT_ID: "${{(github.event_name == 'push' && github.ref == 'refs/heads/current') && secrets.EXTRACT_SANITY_PROJECT_ID || secrets.DEV_EXTRACT_SANITY_PROJECT_ID}}"
EXTRACT_SANITY_DATASET: "${{(github.event_name == 'push' && github.ref == 'refs/heads/current') && secrets.EXTRACT_SANITY_DATASET || secrets.DEV_EXTRACT_SANITY_DATASET}}"
EXTRACT_SANITY_API_TOKEN: "${{(github.event_name == 'push' && github.ref == 'refs/heads/current') && secrets.EXTRACT_SANITY_API_TOKEN || secrets.DEV_EXTRACT_SANITY_API_TOKEN}}"
run: yarn etl sanity
run: pnpm etl sanity
6 changes: 3 additions & 3 deletions .github/workflows/formatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Run format check
run: yarn turbo run check:format
run: pnpm turbo run check:format
12 changes: 6 additions & 6 deletions .github/workflows/lint-fix-if-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,32 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Cache ESLint cache
uses: actions/cache@v3
with:
path: .eslintcache
key: eslint-v1-${{ hashFiles('.eslintrc.cjs') }}
- run: "yarn lint:fix --rule 'prettier/prettier: [off]'"
- run: "pnpm lint:fix --rule 'prettier/prettier: [off]'"
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
# Run even if `yarn lint:fix` fails
# Run even if `pnpm lint:fix` fails
if: always()
id: generate-token
with:
app_id: ${{ secrets.ECOSPARK_APP_ID }}
private_key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6
# Run even if `yarn lint:fix` fails
# Run even if `lint:fix` fails
if: always()
with:
body: "I ran `yarn lint:fix --rule 'prettier/prettier: [off]'` 🧑‍💻"
body: "I ran `lint:fix --rule 'prettier/prettier: [off]'` 🧑‍💻"
branch: actions/lint-fix-if-needed
commit-message: 'chore(lint): fix linter issues 🤖 ✨'
labels: 🤖 bot
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lintPr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Lint files
run: yarn lint
run: pnpm lint
6 changes: 3 additions & 3 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
working-directory: ./perf
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Store Playwright's Version
run: |
Expand All @@ -58,4 +58,4 @@ jobs:
PERF_TEST_BRANCH: 'next'
PERF_TEST_SANITY_TOKEN: ${{ secrets.PERF_TEST_SANITY_TOKEN }}
PERF_TEST_METRICS_TOKEN: ${{ secrets.PERF_TEST_METRICS_TOKEN }}
run: yarn perf:test:ci
run: pnpm perf:test:ci
Loading

0 comments on commit 5a65aad

Please sign in to comment.