Skip to content

ci: install Apify CLI with pnpm in scheduled e2e tests#1874

Merged
vdusek merged 2 commits intomasterfrom
fix/e2e-tests-apify-cli-pnpm
May 6, 2026
Merged

ci: install Apify CLI with pnpm in scheduled e2e tests#1874
vdusek merged 2 commits intomasterfrom
fix/e2e-tests-apify-cli-pnpm

Conversation

@vdusek
Copy link
Copy Markdown
Collaborator

@vdusek vdusek commented May 6, 2026

Description

The scheduled E2E tests workflow has been failing on every matrix job at the Install dependencies step (latest example: run 25421420663).

npm install -g apify-cli now fails because the published apify-cli package ships a preinstall hook (npx only-allow pnpm) that refuses non-pnpm installs. On the GitHub runners that hook can't auto-fetch only-allow and exits before any test runs:

npm error code 127
npm error path /opt/hostedtoolcache/node/22.22.2/x64/lib/node_modules/apify-cli
npm error command sh -c npx only-allow pnpm
npm error sh: 1: only-allow: not found

Changes

  • Add a Setup pnpm step using pnpm/action-setup@v4.
  • Install apify-cli globally via pnpm add -g apify-cli instead of npm install -g.

This mirrors the pnpm-based approach already adopted by the docs workflows in #1871.

🤖 Generated with Claude Code

`npm install -g apify-cli` started failing in the scheduled E2E tests
because the package now ships a `preinstall` hook (`npx only-allow
pnpm`) to refuse non-pnpm installs. On the GitHub runners the hook
exits 127 (`sh: 1: only-allow: not found`) before any test runs, so
every matrix job fails at the install step (e.g. run 25421420663).

Set up pnpm via `pnpm/action-setup` and install `apify-cli` globally
with `pnpm add -g`, mirroring the pnpm-based approach already used in
the docs workflows (#1871).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added this to the 140th sprint - Tooling team milestone May 6, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label May 6, 2026
@vdusek vdusek added the adhoc Ad-hoc unplanned task added during the sprint. label May 6, 2026
@vdusek vdusek requested a review from janbuchar May 6, 2026 07:16
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.56%. Comparing base (65bf68d) to head (8277aaa).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1874      +/-   ##
==========================================
- Coverage   92.57%   92.56%   -0.01%     
==========================================
  Files         158      158              
  Lines       11078    11078              
==========================================
- Hits        10255    10254       -1     
- Misses        823      824       +1     
Flag Coverage Δ
unit 92.56% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@B4nan
Copy link
Copy Markdown
Member

B4nan commented May 6, 2026

We need to fix this in the CLI, we can't enforce pnpm downstream, that would be a pretty crazy move for an OSS project.

@B4nan
Copy link
Copy Markdown
Member

B4nan commented May 6, 2026

On the other hand, we should use pnpm here, so let's merge this if it helps. Just saying that this happening is a bug in the CLI on its own.

@janbuchar
Copy link
Copy Markdown
Collaborator

@vdusek
Copy link
Copy Markdown
Collaborator Author

vdusek commented May 6, 2026

@janbuchar please recheck

Copy link
Copy Markdown
Collaborator

@janbuchar janbuchar left a comment

Choose a reason for hiding this comment

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

LGTM

@vdusek vdusek merged commit b0f6c9f into master May 6, 2026
32 checks passed
@vdusek vdusek deleted the fix/e2e-tests-apify-cli-pnpm branch May 6, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants