Skip to content

Commit 7d6a11f

Browse files
committed
test: initialize git repo in integration tests
Init command now requires being at a git repo root, so the integration tests need to run git init in temp directories before testing the init command.
1 parent 46846a5 commit 7d6a11f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/integration-test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ jobs:
232232
run: |
233233
INIT_DIR=$(mktemp -d)
234234
cd "$INIT_DIR"
235+
git init
235236
$GITHUB_WORKSPACE/tests/${{ matrix.binary }} init --current-platform-only
236237
237238
# Verify files were created
@@ -271,6 +272,7 @@ jobs:
271272
run: |
272273
INIT_DIR=$(mktemp -d)
273274
cd "$INIT_DIR"
275+
git init
274276
$GITHUB_WORKSPACE/tests/${{ matrix.binary }} init --platforms linux-amd64,macos-arm64,windows-amd64
275277
276278
# Verify config has the right platforms
@@ -309,6 +311,7 @@ jobs:
309311
run: |
310312
INIT_DIR=$(mktemp -d)
311313
cd "$INIT_DIR"
314+
git init
312315
313316
# First init with one platform
314317
$GITHUB_WORKSPACE/tests/${{ matrix.binary }} init --platforms linux-amd64
@@ -345,6 +348,7 @@ jobs:
345348
run: |
346349
INIT_DIR=$(mktemp -d)
347350
cd "$INIT_DIR"
351+
git init
348352
$GITHUB_WORKSPACE/tests/${{ matrix.binary }} init --platforms linux-amd64,windows-amd64
349353
350354
OUTPUT=$($GITHUB_WORKSPACE/tests/${{ matrix.binary }} init --show-platforms 2>&1)
@@ -365,6 +369,7 @@ jobs:
365369
run: |
366370
INIT_DIR=$(mktemp -d)
367371
cd "$INIT_DIR"
372+
git init
368373
$GITHUB_WORKSPACE/tests/${{ matrix.binary }} init --platforms linux-amd64
369374
370375
# Try to remove the only platform - should fail

0 commit comments

Comments
 (0)