Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
!package.json
!tsconfig.build.json
!tsconfig.json
!package-lock.json
!pnpm-lock.yaml
!pnpm-workspace.yaml
!packages/*
!scripts/local-pack.sh
20 changes: 12 additions & 8 deletions .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v3
with:
node-version: 24
cache: npm
cache: pnpm
- name: Install Dependencies
run: npm ci
run: pnpm i --frozen-lockfile
- name: Install External
run: npm i -g hyperfine

Expand All @@ -37,18 +41,18 @@ jobs:

- name: Prepare
run: |
npm run compile
npm run pack:prepare
pnpm run compile
pnpm run pack:prepare
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The performance benchmark fails because tests/performance/ sits inside the root pnpm workspace. When you run pnpm i there, pnpm detects the parent workspace and installs everything at the root level
Try to isolate tests/performance/ as its own workspace root so pnpm installs dependencies locally

cd tests/performance/
npm i
npm run make-test
pnpm i
pnpm run make-test

- name: Run Benchmark
run: |
cd tests/performance/
npm run test # This command is generated and injected into package.json in the previous step.
pnpm run test # This command is generated and injected into package.json in the previous step.
cat benchmark_check.md
npm run chart # Creates benchmark_chart.md with the performance bar chart.
pnpm run chart # Creates benchmark_chart.md with the performance bar chart.

- name: Comment PR
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
node-version: 24
- name: Check Redocly Config Version
run: |
LATEST_VERSION=$(npm view @redocly/config version)
LATEST_VERSION=$(pnpm info @redocly/config version)
CURRENT_VERSION=$(jq -r '.dependencies["@redocly/config"] | ltrimstr("^") | ltrimstr("~")' packages/core/package.json)
echo Latest: $LATEST_VERSION, Current: $CURRENT_VERSION
if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then
Expand Down
43 changes: 29 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,31 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 24
cache: npm
cache: pnpm

- name: Install Dependencies
run: npm ci
run: pnpm i --frozen-lockfile

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: RomanHotsiy/changesets-action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: npm run release
publish: pnpm run release
commit: 'chore: 🔖 release new versions'
title: 'chore: 🔖 release new versions'
version: |
npx changeset version
npm i
pnpm exec changeset version
pnpm i
node scripts/post-changeset.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -119,7 +124,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- name: Install CLI from npm
run: npm i -g @redocly/cli@latest
run: pnpm i -g @redocly/cli@latest
- name: Test version from NPM
continue-on-error: true
run: |
Expand Down Expand Up @@ -160,14 +165,19 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 24
cache: npm
cache: pnpm

- name: Install Dependencies
run: npm ci
run: pnpm i --frozen-lockfile

- name: Write release message to file
run: node scripts/write-release-message.js
Expand All @@ -193,11 +203,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 24
cache: npm
cache: pnpm
registry-url: https://registry.npmjs.org

- name: Update package versions
Expand Down Expand Up @@ -237,22 +252,22 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number }}

- name: Install dependencies
run: npm install
run: pnpm install

- name: Build packages
run: npm run compile
run: pnpm run compile

- name: Publish snapshot packages
run: |
git diff

cd packages/core
npm publish --tag snapshot
pnpm publish --tag snapshot
sleep 10

cd ../respect-core
npm publish --tag snapshot
pnpm publish --tag snapshot
sleep 10

cd ../cli
npm publish --tag snapshot
pnpm publish --tag snapshot
9 changes: 7 additions & 2 deletions .github/workflows/require-changeset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ jobs:
with:
# check out full history
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v3
with:
node-version: 24
cache: npm
- run: npm ci
cache: pnpm
- name: Install Dependencies
run: pnpm i --frozen-lockfile
- name: Check for changeset
run: npx changeset status --since origin/main
8 changes: 6 additions & 2 deletions .github/workflows/smoke-plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v3
with:
node-version: 24
cache: npm
cache: pnpm
- name: Install dependencies
run: npm ci
run: pnpm i --frozen-lockfile
- name: Prepare Smoke
run: bash ./tests/smoke/plugins/prepare-smoke-plugins.sh
- uses: actions/cache@v3
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/smoke-rebilly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v3
with:
node-version: 24
cache: npm
cache: pnpm
- name: Install dependencies
run: npm ci
run: pnpm i --frozen-lockfile
- name: Run Rebilly smoke test
run: npm run smoke:rebilly
run: pnpm run smoke:rebilly
env:
SANDBOX_REBILLY_TOKEN: ${{ secrets.SANDBOX_REBILLY_TOKEN }}
8 changes: 6 additions & 2 deletions .github/workflows/smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v3
with:
node-version: 24
cache: npm
cache: pnpm
- name: Install dependencies
run: npm ci
run: pnpm i --frozen-lockfile
- name: Prepare Smoke
run: bash ./tests/smoke/basic/prepare-smoke.sh
- uses: actions/cache@v3
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,44 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v3
with:
node-version: 24
cache: npm
cache: pnpm
- name: Install dependencies
run: npm ci
run: pnpm i --frozen-lockfile
- name: Typecheck
run: npm run typecheck
run: pnpm run typecheck
- name: Unit Tests
run: npm run unit
run: pnpm run unit

- name: Coverage Report
if: always() # Also generate the report if tests are failing
continue-on-error: true # Do not fail if there is an error during reporting
uses: davelosert/vitest-coverage-report-action@v2

- name: E2E Tests
run: npm run e2e
run: pnpm run e2e

code-style-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v3
with:
node-version: 24
cache: npm
cache: pnpm
- name: Install dependencies
run: npm ci
run: pnpm i --frozen-lockfile
- name: Lint
run: npm run lint
run: pnpm run lint
- name: Check formatting
run: npm run format:check
run: pnpm run format:check
Loading
Loading