Run CI tests in parallel; allow to pass Bats options (#3615)

Make tests about 1,5 times faster except `test-docker`
This commit is contained in:
native-api authored and GitHub committed 2026-10-30 02:54:18 +03:00
1 parent 973bfbcd41
commit 81eef98787
3 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ jobs:
- name: Install prerequisites
run: |
if test "$RUNNER_OS" == "macOS"; then
brew install coreutils fish
brew install coreutils fish parallel
fi
- name: Run tests
run: |
+6 -6
View File
@@ -148,16 +148,16 @@ test-unit: bats
PATH="./bats/bin:$$PATH" test/run
test-python-build: bats
cd plugins/python-build && $(PWD)/bats/bin/bats $${CI:+-F "$(PWD)/test/libexec/bats-format-tap-suite"} \
$${BATS_TEST_FILTER:+--filter "$${BATS_TEST_FILTER}"} test/$${BATS_FILE_FILTER}
cd plugins/python-build && $(PWD)/bats/bin/bats $${CI:+-j $$(($$(getconf _NPROCESSORS_ONLN)*2)) -F "$(PWD)/test/libexec/bats-format-tap-suite"} \
$${BATS_TEST_FILTER:+--filter "$${BATS_TEST_FILTER}"} $${BATS_ARGS} test/$${BATS_FILE_FILTER}
test-binary: bats
cd plugins/pyenv-binary && $(PWD)/bats/bin/bats $${CI:+-F "$(PWD)/test/libexec/bats-format-tap-suite"} \
$${BATS_TEST_FILTER:+--filter "$${BATS_TEST_FILTER}"} test/$${BATS_FILE_FILTER}
cd plugins/pyenv-binary && $(PWD)/bats/bin/bats $${CI:+-j $$(($$(getconf _NPROCESSORS_ONLN)*2)) -F "$(PWD)/test/libexec/bats-format-tap-suite"} \
$${BATS_TEST_FILTER:+--filter "$${BATS_TEST_FILTER}"} $${BATS_ARGS} test/$${BATS_FILE_FILTER}
test-link: bats
cd plugins/pyenv-link && $(PWD)/bats/bin/bats $${CI:+-F "$(PWD)/test/libexec/bats-format-tap-suite"} \
$${BATS_TEST_FILTER:+--filter "$${BATS_TEST_FILTER}"} test/$${BATS_FILE_FILTER}
cd plugins/pyenv-link && $(PWD)/bats/bin/bats $${CI:+-j $$(($$(getconf _NPROCESSORS_ONLN)*2)) -F "$(PWD)/test/libexec/bats-format-tap-suite"} \
$${BATS_TEST_FILTER:+--filter "$${BATS_TEST_FILTER}"} $${BATS_ARGS} test/$${BATS_FILE_FILTER}
.SECONDARY: bats-$(TEST_BATS_VERSION)
bats-$(TEST_BATS_VERSION):
+1 -1
View File
@@ -6,4 +6,4 @@ if [ -n "$PYENV_NATIVE_EXT" ]; then
make -C src
fi
exec bats ${CI:+-F "$PWD/test/libexec/bats-format-tap-suite"} ${BATS_TEST_FILTER:+--filter "${BATS_TEST_FILTER}"} test/${BATS_FILE_FILTER}
exec bats ${CI:+-j $(($(getconf _NPROCESSORS_ONLN)*2)) -F "$PWD/test/libexec/bats-format-tap-suite"} ${BATS_TEST_FILTER:+--filter "${BATS_TEST_FILTER}"} ${BATS_ARGS} test/${BATS_FILE_FILTER}