CI: listTasks テストに git config user 設定を追加

GitHub Actions の runner に git user.name/email が未設定のため
git commit が失敗していた問題を修正
This commit is contained in:
nrslib 2026-02-06 11:22:04 +09:00
parent 9b747c3fdc
commit 3c22b0e17d

View File

@ -346,6 +346,8 @@ describe('listTasks non-interactive JSON output', () => {
tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'takt-test-json-')); tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'takt-test-json-'));
// Initialize as a git repo so detectDefaultBranch works // Initialize as a git repo so detectDefaultBranch works
execFileSync('git', ['init', '--initial-branch', 'main'], { cwd: tmpDir, stdio: 'pipe' }); execFileSync('git', ['init', '--initial-branch', 'main'], { cwd: tmpDir, stdio: 'pipe' });
execFileSync('git', ['config', 'user.name', 'Test User'], { cwd: tmpDir, stdio: 'pipe' });
execFileSync('git', ['config', 'user.email', 'test@example.com'], { cwd: tmpDir, stdio: 'pipe' });
execFileSync('git', ['commit', '--allow-empty', '-m', 'init'], { cwd: tmpDir, stdio: 'pipe' }); execFileSync('git', ['commit', '--allow-empty', '-m', 'init'], { cwd: tmpDir, stdio: 'pipe' });
}); });