[PLUTO-1411] Add script #44
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: plugin it-test | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| cache: true | |
| - name: Build CLI | |
| run: | | |
| go build -o cli-v2 ./cli-v2.go | |
| chmod +x cli-v2 | |
| - name: Run plugin tests | |
| id: run_tests | |
| continue-on-error: true | |
| run: | | |
| # Make the script executable | |
| chmod +x run-tool-tests.sh | |
| # Initialize failed tools file | |
| echo "" > /tmp/failed_tools.txt | |
| # Run tests for each tool directory | |
| for tool_dir in plugins/tools/*/; do | |
| tool_name=$(basename "$tool_dir") | |
| if [ -d "$tool_dir/test/src" ]; then | |
| echo "Running tests for $tool_name..." | |
| ./run-tool-tests.sh "$tool_name" || echo "$tool_name" >> /tmp/failed_tools.txt | |
| fi | |
| done | |
| # Check if any tools failed | |
| if [ -s /tmp/failed_tools.txt ]; then | |
| echo "::error::Some tool tests failed. Please check the logs above for details." | |
| exit 1 | |
| fi | |
| - name: Check test results | |
| if: steps.run_tests.outcome == 'failure' | |
| run: | | |
| if [ -s /tmp/failed_tools.txt ]; then | |
| echo -e "\n❌ The following tools failed their tests:" | |
| cat /tmp/failed_tools.txt | |
| fi | |
| echo "Some tool tests failed. Please check the logs above for details." | |
| exit 1 |