DOC-1899 AI Agents #86
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: Test Pipeline Examples | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'modules/ai-agents/examples/**/*.yaml' | |
| - 'modules/ai-agents/examples/**/*.sh' | |
| - 'modules/develop/examples/**/*.yaml' | |
| - 'modules/develop/examples/**/*.sh' | |
| jobs: | |
| test-all-examples: | |
| name: Test All Pipeline Examples | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install npm dependencies | |
| run: npm install | |
| - name: Install doc-tools dependencies | |
| run: npx --no-install doc-tools install-test-dependencies | |
| - name: Install yq | |
| run: | | |
| sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 | |
| sudo chmod +x /usr/local/bin/yq | |
| - name: Make test scripts executable | |
| run: | | |
| find modules/ai-agents/examples -name "*.sh" -exec chmod +x {} \; | |
| find modules/develop/examples -name "*.sh" -exec chmod +x {} \; 2>/dev/null || true | |
| - name: Run MCP tools tests | |
| run: | | |
| cd modules/ai-agents/examples/mcp-tools | |
| ./test-mcp-tools.sh | |
| - name: Run ai-agents pipeline tests | |
| run: | | |
| cd modules/ai-agents/examples/pipelines | |
| ./test-pipelines.sh | |
| - name: Run cookbook tests | |
| run: | | |
| for dir in modules/develop/examples/cookbooks/*/; do | |
| if [[ -f "${dir}test-"*".sh" ]]; then | |
| echo "Testing ${dir}..." | |
| cd "${dir}" | |
| ./test-*.sh | |
| cd - > /dev/null | |
| fi | |
| done | |
| - name: Test Summary | |
| if: always() | |
| run: | | |
| echo "::notice title=Pipeline Examples Testing::All pipeline examples have been validated" |