Skip to content

Commit 9c8e4ef

Browse files
committed
fix(ci): update dry-run command in test workflow to improve output handling
1 parent 90bbf2d commit 9c8e4ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
id: dry-run
5050
run: |
5151
pnpm run test:local+dry-run > ./test-dry-run.json || true
52-
SKIP_TESTS=$(tail -n +5 ./test-dry-run.json | jq -r '.tasks | map(select(.task == "test")) | all((.cache.status == "HIT") or (.cache.status == "MISS" and .command == "<NONEXISTENT>"))' 2>/dev/null || echo "false")
52+
SKIP_TESTS=$(sed -n '/^{/,$p' ./test-dry-run.json | jq -r '.tasks | map(select(.task == "test")) | all((.cache.status == "HIT") or (.cache.status == "MISS" and .command == "<NONEXISTENT>"))' 2>/dev/null || echo "false")
5353
echo "skip=$SKIP_TESTS" >> "$GITHUB_OUTPUT"
5454
echo "Test cache skip: $SKIP_TESTS"
5555

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"test": "turbo run test --concurrency 1",
88
"test:no-cache": "pnpm test -- --force",
99
"test:local": "PL_PKG_DEV=local pnpm test",
10-
"test:local+dry-run": "pnpm test:local -- --dry-run=json | tail -n +8",
10+
"test:local+dry-run": "pnpm test:local -- --dry-run=json",
1111
"test:local+no-cache": "pnpm test:local -- --force",
1212
"do-pack": "turbo run do-pack",
1313
"do-pack:local": "PL_PKG_DEV=local turbo run do-pack",

0 commit comments

Comments
 (0)