7070
7171 - name : Run init tests on Windows
7272 if : matrix.os == 'windows-latest'
73+ id : run_init_tests_windows
74+ continue-on-error : true
7375 shell : pwsh
7476 run : |
7577 $ErrorActionPreference = "Stop"
@@ -92,55 +94,41 @@ jobs:
9294 chmod +x integration-tests/run.sh
9395 ./integration-tests/run.sh
9496
95- - name : Run tool tests
97+ - name : Run tool tests on Unix
9698 if : matrix.os != 'windows-latest'
97- id : run_tests
98- continue-on-error : true
99- shell : bash
100- run : |
101- # Make the script executable
102- chmod +x run-tool-tests.sh
103-
104- # Initialize failed tools file
105- rm -f /tmp/failed_tools.txt
106- touch /tmp/failed_tools.txt
107-
108- # Run tests for each tool directory
109- for tool_dir in plugins/tools/*/; do
110- tool_name=$(basename "$tool_dir")
111- if [ -d "$tool_dir/test/src" ]; then
112- echo "Running tests for $tool_name..."
113- ./run-tool-tests.sh "$tool_name" || {
114- echo "❌ Test failed for $tool_name"
115- echo "$tool_name" >> /tmp/failed_tools.txt
116- }
117- fi
118- done
119-
120- # Check if any tools failed
121- if [ -s /tmp/failed_tools.txt ] && [ "$(wc -l < /tmp/failed_tools.txt)" -gt 0 ]; then
122- echo -e "\n❌ The following tools failed their tests:"
123- cat /tmp/failed_tools.txt
124- echo "::error::Some tool tests failed. Please check the logs above for details."
125- exit 1
126- else
127- echo "✅ All tool tests passed successfully!"
128- fi
99+ uses : ./.github/workflows/tool-tests.yml
100+ with :
101+ shell : bash
102+
103+ - name : Run tool tests on Windows
104+ if : matrix.os == 'windows-latest'
105+ uses : ./.github/workflows/tool-tests.yml
106+ with :
107+ shell : wsl
129108
130109 - name : Check test results
131110 if : always()
132111 shell : bash
133112 run : |
134113 # Check init tests
135- if [ "${{ steps.run_init_tests_unix.outcome }}" = "failure" ]; then
136- echo "::error::Init tests failed"
137- FAILED=true
138- fi
139-
140- # Check tool tests
141- if [ "${{ steps.run_tests.outcome }}" = "failure" ]; then
142- echo "::error::Tool tests failed"
143- FAILED=true
114+ if [ "${{ matrix.os }}" = "windows-latest" ]; then
115+ if [ "${{ steps.run_init_tests_windows.outcome }}" = "failure" ]; then
116+ echo "::error::Windows init tests failed"
117+ FAILED=true
118+ fi
119+ if [ "${{ steps.run_tests_windows.outcome }}" = "failure" ]; then
120+ echo "::error::Windows tool tests failed"
121+ FAILED=true
122+ fi
123+ else
124+ if [ "${{ steps.run_init_tests_unix.outcome }}" = "failure" ]; then
125+ echo "::error::Unix init tests failed"
126+ FAILED=true
127+ fi
128+ if [ "${{ steps.run_tests_unix.outcome }}" = "failure" ]; then
129+ echo "::error::Unix tool tests failed"
130+ FAILED=true
131+ fi
144132 fi
145133
146134 # Fail if any tests failed
0 commit comments