Skip to content

ci: fix e2e templates tests failing on mise shim cwd resolution#1885

Merged
vdusek merged 1 commit intomasterfrom
fix/e2e-templates-tests-mise-cwd
May 8, 2026
Merged

ci: fix e2e templates tests failing on mise shim cwd resolution#1885
vdusek merged 1 commit intomasterfrom
fix/e2e-templates-tests-mise-cwd

Conversation

@vdusek
Copy link
Copy Markdown
Collaborator

@vdusek vdusek commented May 8, 2026

Summary

The scheduled e2e template tests have been failing on every matrix job since #1874 / #1880 adopted apify/setup-apify-cli-action@v1.0.0. The action installs apify-cli via a mise shim that resolves the apify version by walking up from cwd looking for a mise.toml. Our tests run subprocess.run(['apify', ...], cwd=tmp_path / actor_name) from pytest's default tmp_path (/tmp/pytest-of-runner/...), which is outside MISE_TRUSTED_CONFIG_PATHS and contains no mise config. The shim therefore errors with No version is set for shim: apify.

This mirrors how apify/crawlee handles the same situation in test/e2e/tools.mjs (running apify push from a directory under the project root and setting GIT_CEILING_DIRECTORIES).

Changes

  • pyproject.toml: pass --basetemp=./.pytest-tmp to the e2e-templates-tests poe task so pytest's tmp_path lives under the project root, where mise's parent traversal finds the mise.toml written by jdx/mise-action to $GITHUB_WORKSPACE.
  • .gitignore: ignore .pytest-tmp.
  • tests/e2e/project_template/test_static_crawlers_templates.py: set GIT_CEILING_DIRECTORIES=tmp_path on the apify push call so git stops before reaching the project's .git/.

Failing run: https://github.com/apify/crawlee-python/actions/runs/25541426007

The apify/setup-apify-cli-action installs apify-cli via a mise shim that
resolves the version from cwd. Tests that subprocess into pytest's tmp_path
under /tmp couldn't find a mise config and failed with "No version is set
for shim: apify". Move pytest's basetemp under the project root so mise's
parent traversal finds the action's mise.toml in $GITHUB_WORKSPACE, and set
GIT_CEILING_DIRECTORIES on apify push so git doesn't reach the project's
.git/.
@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels May 8, 2026
@vdusek vdusek self-assigned this May 8, 2026
@github-actions github-actions Bot added this to the 140th sprint - Tooling team milestone May 8, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label May 8, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.76%. Comparing base (cd15dce) to head (bcb735a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1885      +/-   ##
==========================================
+ Coverage   92.70%   92.76%   +0.05%     
==========================================
  Files         161      161              
  Lines       11356    11356              
==========================================
+ Hits        10528    10534       +6     
+ Misses        828      822       -6     
Flag Coverage Δ
unit 92.76% <ø> (+0.05%) ⬆️

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.

@vdusek vdusek merged commit 6a1995e into master May 8, 2026
32 checks passed
@vdusek vdusek deleted the fix/e2e-templates-tests-mise-cwd branch May 8, 2026 07:53
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. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants