smoke test #170
This file contains 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: smoke test | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 2 * * * | |
jobs: | |
smoke-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: sap/ai-sdk-js/.github/actions/setup@main | |
- run: pnpm smoke-tests create-deployment | |
- uses: vchrisb/setup-cf@v1 | |
with: | |
api: ${{ vars.CF_API_URL }} | |
username: ${{ secrets.CF_USER }} | |
password: ${{ secrets.CF_PASSWORD }} | |
org: ${{ vars.CF_ORG }} | |
space: ${{ vars.CF_SPACE }} | |
- run: cf push | |
working-directory: tests/smoke-tests | |
- name: smoke test | |
run: pnpm test:smoke | |
- name: shutdown | |
if: always() | |
run: cf stop smoke-test-app | |
- name: 'Slack Notification' | |
if: failure() | |
uses: slackapi/[email protected] | |
with: | |
webhook: ${{ secrets.SLACK_WEBHOOK }} | |
webhook-type: incoming-webhook | |
payload: | | |
{ | |
"username": "GitHub E2E Test Runner", | |
"text": "⚠️ Smoke Test Failed 🚭! Please inspect & fix by clicking <https://github.com/SAP/ai-sdk-js/actions/runs/${{ github.run_id }}|here>" | |
} |