Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,19 @@ jobs:
run: ./bashunit --parallel --jobs 4 ${{ matrix.test_path }}

alpine:
name: "Alpine - latest"
name: "Alpine - ${{ matrix.name }}"
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- name: "sequential"
command: "make test"
- name: "parallel simple"
command: "./bashunit --parallel --simple tests/"
- name: "parallel extended"
command: "./bashunit --parallel tests/"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -187,4 +197,4 @@ jobs:
apk add --no-cache bash make git jq && \
adduser -D builder && \
chown -R builder /project && \
su - builder -c 'cd /project; make test';"
su - builder -c 'cd /project; ${{ matrix.command }}';"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Fix invalid `.env.example` coverage threshold entry and copy `.env.example` to `.env` in CI test workflows so configuration parse errors are caught during automated test runs
- Fix `clock::now` shell-time parsing when `EPOCHREALTIME` uses a comma decimal separator
- Fix LCOV and HTML coverage reports generating incomplete/empty output due to post-increment operator causing silent exit under `set -e` (#618)
- Enable parallel test execution on Alpine Linux; previously gated off due to race conditions, now resolved (#370)

## [0.34.1](https://github.com/TypedDevs/bashunit/compare/0.34.0...0.34.1) - 2026-03-20

Expand Down
3 changes: 2 additions & 1 deletion src/parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ function bashunit::parallel::is_enabled() {
"requested:$BASHUNIT_PARALLEL_RUN" "os:${_BASHUNIT_OS:-Unknown}"

if bashunit::env::is_parallel_run_enabled &&
(bashunit::check_os::is_macos || bashunit::check_os::is_ubuntu || bashunit::check_os::is_windows); then
(bashunit::check_os::is_macos || bashunit::check_os::is_ubuntu ||
bashunit::check_os::is_alpine || bashunit::check_os::is_windows); then
return 0
fi
return 1
Expand Down
11 changes: 11 additions & 0 deletions tests/unit/parallel_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ function test_parallel_enabled_on_ubuntu() {
bashunit::mock bashunit::check_os::is_windows mock_false
bashunit::mock bashunit::check_os::is_macos mock_false
bashunit::mock bashunit::check_os::is_ubuntu mock_true
bashunit::mock bashunit::check_os::is_alpine mock_false

assert_successful_code "$(bashunit::parallel::is_enabled)"
}

function test_parallel_enabled_on_alpine() {
bashunit::mock bashunit::check_os::is_windows mock_false
bashunit::mock bashunit::check_os::is_macos mock_false
bashunit::mock bashunit::check_os::is_ubuntu mock_false
bashunit::mock bashunit::check_os::is_alpine mock_true

assert_successful_code "$(bashunit::parallel::is_enabled)"
}
Expand All @@ -93,6 +103,7 @@ function test_parallel_disabled_on_unsupported_os() {
bashunit::mock bashunit::check_os::is_windows mock_false
bashunit::mock bashunit::check_os::is_macos mock_false
bashunit::mock bashunit::check_os::is_ubuntu mock_false
bashunit::mock bashunit::check_os::is_alpine mock_false

assert_general_error "$(bashunit::parallel::is_enabled)"
}
Expand Down
Loading