diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f260857..59165bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,17 +95,20 @@ jobs: run: | mkdir -p coverage + # Use full path to bats since kcov subprocess doesn't inherit npm PATH + BATS_CMD="$(pwd)/node_modules/.bin/bats" + # Run CLI parsing tests under kcov kcov --include-path="$(pwd)/ralph_loop.sh,$(pwd)/lib" \ --exclude-pattern=tests/,node_modules/ \ coverage/cli-parsing \ - bash -c "bats tests/unit/test_cli_parsing.bats" || true + bash -c "$BATS_CMD tests/unit/test_cli_parsing.bats" || true # Run all unit tests under kcov for comprehensive coverage kcov --include-path="$(pwd)/ralph_loop.sh,$(pwd)/lib" \ --exclude-pattern=tests/,node_modules/ \ coverage/all-unit \ - bash -c "bats tests/unit/" || true + bash -c "$BATS_CMD tests/unit/" || true - name: Parse coverage results id: coverage