File tree Expand file tree Collapse file tree 2 files changed +38
-6
lines changed
Expand file tree Collapse file tree 2 files changed +38
-6
lines changed Original file line number Diff line number Diff line change 77 branches : [ main, master, v* ]
88
99jobs :
10- test :
10+ # Simple multi-platform test
11+ simple-test :
1112 strategy :
1213 matrix :
1314 os : [ubuntu-latest, macos-latest, windows-latest]
5859 if : runner.os == 'Windows'
5960 shell : msys2 {0}
6061 run : bash test/simple.test.sh
62+
63+ # Comprehensive Docker-based tests (all cross-platform targets)
64+ docker-tests :
65+ runs-on : ubuntu-latest
66+ timeout-minutes : 120 # Docker tests can take a while
67+
68+ steps :
69+ - name : Checkout code
70+ uses : actions/checkout@v4
71+
72+ - name : Set up Docker Buildx
73+ uses : docker/setup-buildx-action@v3
74+
75+ - name : Enable Docker experimental features
76+ run : |
77+ set -e
78+ echo '{"experimental": true}' | sudo tee /etc/docker/daemon.json
79+ sudo systemctl restart docker
80+ # Verify Docker is working after restart
81+ docker --version
82+ docker info > /dev/null
83+
84+ - name : Run comprehensive test suite
85+ run : |
86+ cd test
87+ bash all.test.sh
6188
Original file line number Diff line number Diff line change @@ -19,10 +19,15 @@ total_tests=0
1919
2020echo " Searching for test files ending with '.test.sh'..."
2121
22- # Use find with proper handling and avoid command injection
23- while IFS= read -r -d ' ' test_file; do
24- # Skip this script itself
25- if [[ " $( basename " $test_file " ) " == " all.test.sh" ]]; then
22+ # Find and run test files using a simple compatible approach
23+ for test_file in ./* .test.sh; do
24+ # Skip if no files match the pattern
25+ if [[ ! -f " $test_file " ]]; then
26+ continue
27+ fi
28+
29+ # Skip this script itself to prevent infinite recursion
30+ if [[ " $( basename " $test_file " ) " == " $( basename " ${BASH_SOURCE[0]} " ) " ]]; then
2631 continue
2732 fi
2833
@@ -48,7 +53,7 @@ while IFS= read -r -d '' test_file; do
4853 fi
4954 echo " "
5055
51- done < <( find . -maxdepth 1 -name ' *.test.sh ' -type f -print0 )
56+ done
5257
5358if [[ " $total_tests " -eq 0 ]]; then
5459 echo " No test files found ending with '.test.sh'"
You can’t perform that action at this time.
0 commit comments