File tree 6 files changed +40
-1
lines changed
tests/acceptance/fixtures
6 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -7,3 +7,4 @@ BASHUNIT_SHOW_EXECUTION_TIME=
7
7
BASHUNIT_LOG_JUNIT =
8
8
BASHUNIT_REPORT_HTML =
9
9
BASHUNIT_LOAD_FILE =
10
+ BASHUNIT_ALPINE_TEST_VERSION =
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ Run tests from the library:
55
55
``` bash
56
56
# using make
57
57
make test
58
+ make alpine-test
58
59
59
60
# using bashunit itself
60
61
./bashunit tests/** /* _test.sh
Original file line number Diff line number Diff line change 32
32
- name : Run Tests
33
33
run : ${{ matrix.script_name }}
34
34
35
+ alpine :
36
+ name : " Run tests on alpine"
37
+ runs-on : ${{ matrix.os }}
38
+ strategy :
39
+ matrix :
40
+ os :
41
+ - ubuntu-latest
42
+ include :
43
+ - os : ubuntu-latest
44
+ script_name : ' make test-alpine'
45
+ steps :
46
+ - name : Checkout
47
+ uses : actions/checkout@v4
48
+ with :
49
+ fetch-depth : 0
50
+
51
+ - name : Run Tests
52
+ run : ${{ matrix.script_name }}
53
+
Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
- ## Unreleased
3
+ ## [ Unreleased] ( https://github.com/TypedDevs/bashunit/compare/0.16.0...main )
4
4
5
5
- Rename ` BASHUNIT_TESTS_ENV ` to ` BASHUNIT_LOAD_FILE `
6
+ - Added support for running tests in Alpine
6
7
7
8
## [ 0.16.0] ( https://github.com/TypedDevs/bashunit/compare/0.15.0...0.16.0 ) - 2024-09-15
8
9
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ SHELL=/bin/bash
5
5
STATIC_ANALYSIS_CHECKER := $(shell which shellcheck 2> /dev/null)
6
6
LINTER_CHECKER := $(shell which ec 2> /dev/null)
7
7
GIT_DIR = $(shell git rev-parse --git-dir 2> /dev/null)
8
+ BASHUNIT_ALPINE_TEST_VERSION_DEFAULT: ="3.20"
8
9
9
10
OS: =
10
11
ifeq ($(OS ) ,Windows_NT)
35
36
endif
36
37
endif
37
38
39
+ ifeq ($(BASHUNIT_ALPINE_TEST_VERSION ) ,)
40
+ BASHUNIT_ALPINE_TEST_VERSION_DEFAULT:="3.20"
41
+ endif
42
+
38
43
help :
39
44
@echo " "
40
45
@echo " Usage: make [command]"
@@ -67,6 +72,16 @@ test/watch: $(TEST_SCRIPTS)
67
72
@./bashunit $(TEST_SCRIPTS )
68
73
@fswatch -m poll_monitor -or $(SRC_SCRIPTS_DIR ) $(TEST_SCRIPTS_DIR ) .env Makefile | xargs -n1 ./bashunit $(TEST_SCRIPTS )
69
74
75
+ test-alpine :
76
+ # Run tests for Alpine in a container with only the very basic dependencies. Bashunit should work for the base
77
+ # Alpine installation.
78
+ docker run -v $$(pwd ) :/working --rm alpine:${BASHUNIT_ALPINE_TEST_VERSION} /bin/sh -c " \
79
+ apk update && \
80
+ apk add bash make && \
81
+ adduser -D builder && \
82
+ chown -R builder /working && \
83
+ su - builder -c ' cd /working; make test' ; "
84
+
70
85
env/example :
71
86
@echo " Copying variables without the values from .env into .env.example"
72
87
@sed ' s/=.*/=/' .env > .env.example
Original file line number Diff line number Diff line change @@ -6,3 +6,5 @@ BASHUNIT_SHOW_EXECUTION_TIME=false
6
6
BASHUNIT_DEFAULT_PATH=
7
7
BASHUNIT_LOG_JUNIT=
8
8
BASHUNIT_REPORT_HTML=
9
+ BASHUNIT_LOAD_FILE=
10
+ BASHUNIT_ALPINE_TEST_VERSION=3.20
You can’t perform that action at this time.
0 commit comments