Skip to content

Commit e976265

Browse files
authored
chore(e2e): restrict git ceiling directory for actor push (apify#3467)
The new `apify-cli` uses `git ls-files` for file collection, which walks up to the repo root and picks up the root `.gitignore` rule `test/e2e/**/packages` — silently excluding the copied crawlee packages from the upload and breaking Docker builds on the platform. Fix: set `GIT_CEILING_DIRECTORIES` when calling `apify push` so git doesn't traverse past the actor directory.
1 parent 6f3cd87 commit e976265

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/e2e/tools.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ export function getActorTestDir(url) {
7171
export async function pushActor(client, dirName) {
7272
await copyPackages(dirName);
7373
try {
74-
execSync('npx -y apify-cli@beta push', { cwd: dirName });
74+
execSync('npx -y apify-cli@beta push', {
75+
cwd: dirName,
76+
env: { ...process.env, GIT_CEILING_DIRECTORIES: dirname(dirName) },
77+
});
7578
} catch (err) {
7679
console.error(colors.red(`Failed to push actor to the Apify platform. (signal ${colors.yellow(err.signal)})`));
7780

0 commit comments

Comments
 (0)