mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(test runner): perform shallow clone check in config directory (#32299)
Our CI operates on shallow clones. In vcs.ts, we perform a check for
shallow clones in `process.cwd()` instead of the test directory. This
makes the test in
3c208aeeff/tests/playwright-test/only-changed.spec.ts (L201)
failing in CI, but only for PRs. The fix is to perform the check on. the
test directory.
This commit is contained in:
parent
cf8c14f884
commit
3f09d10601
@ -30,7 +30,7 @@ export async function detectChangedTestFiles(baseCommit: string, configDir: stri
|
|||||||
|
|
||||||
const unknownRevision = error.output.some(line => line?.includes('unknown revision'));
|
const unknownRevision = error.output.some(line => line?.includes('unknown revision'));
|
||||||
if (unknownRevision) {
|
if (unknownRevision) {
|
||||||
const isShallowClone = childProcess.execSync('git rev-parse --is-shallow-repository', { encoding: 'utf-8', stdio: 'pipe' }).trim() === 'true';
|
const isShallowClone = childProcess.execSync('git rev-parse --is-shallow-repository', { encoding: 'utf-8', stdio: 'pipe', cwd: configDir }).trim() === 'true';
|
||||||
if (isShallowClone) {
|
if (isShallowClone) {
|
||||||
throw new Error([
|
throw new Error([
|
||||||
`The repository is a shallow clone and does not have '${baseCommit}' available locally.`,
|
`The repository is a shallow clone and does not have '${baseCommit}' available locally.`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user