chore(event-gateway): align CLI examples with example-verifier (metri… #40
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 Examples | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test-express: | |
| name: Express - event-gateway | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: skills/event-gateway/examples/express/package.json | |
| - name: Install dependencies | |
| working-directory: skills/event-gateway/examples/express | |
| run: npm install | |
| - name: Run tests | |
| working-directory: skills/event-gateway/examples/express | |
| run: npm test | |
| test-nextjs: | |
| name: Next.js - event-gateway | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: skills/event-gateway/examples/nextjs/package.json | |
| - name: Install dependencies | |
| working-directory: skills/event-gateway/examples/nextjs | |
| run: npm install | |
| - name: Run tests | |
| working-directory: skills/event-gateway/examples/nextjs | |
| run: npm test | |
| test-fastapi: | |
| name: FastAPI - event-gateway | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: "pip" | |
| cache-dependency-path: skills/event-gateway/examples/fastapi/requirements.txt | |
| - name: Install dependencies | |
| working-directory: skills/event-gateway/examples/fastapi | |
| run: pip install -r requirements.txt | |
| - name: Run tests | |
| working-directory: skills/event-gateway/examples/fastapi | |
| run: pytest test_webhook.py -v | |
| summary: | |
| name: Test Summary | |
| runs-on: ubuntu-latest | |
| needs: [test-express, test-nextjs, test-fastapi] | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| echo "## Test Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| if [ "${{ needs.test-express.result }}" == "failure" ] || \ | |
| [ "${{ needs.test-nextjs.result }}" == "failure" ] || \ | |
| [ "${{ needs.test-fastapi.result }}" == "failure" ]; then | |
| echo "**Result:** Some tests failed" >> $GITHUB_STEP_SUMMARY | |
| exit 1 | |
| fi | |
| echo "**Result:** All tests passed!" >> $GITHUB_STEP_SUMMARY |