Trigger hookdeck.com deploy when product skills change #61
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: 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 | |
| test-outpost-saas: | |
| name: Outpost SaaS examples (nextjs-saas + fastapi-saas) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Run test-examples.sh outpost | |
| run: ./scripts/test-examples.sh outpost | |
| summary: | |
| name: Test Summary | |
| runs-on: ubuntu-latest | |
| needs: [test-express, test-nextjs, test-fastapi, test-outpost-saas] | |
| 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" ] || \ | |
| [ "${{ needs.test-outpost-saas.result }}" == "failure" ]; then | |
| echo "**Result:** Some tests failed" >> $GITHUB_STEP_SUMMARY | |
| exit 1 | |
| fi | |
| echo "**Result:** All tests passed!" >> $GITHUB_STEP_SUMMARY |