[pull] master from botpress:master #324
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: Run Zai Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - 'packages/zai/**' | |
| - '.github/workflows/run-zai-tests.yml' | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| run-zai-tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| NODE_OPTIONS: '--max_old_space_size=8192' | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| with: | |
| extra_filters: '-F @botpress/zai' | |
| - name: Login | |
| env: | |
| BP_API_URL: 'https://api.botpress.dev' | |
| BP_WORKSPACE_ID: ${{ secrets.STAGING_E2E_TESTS_WORKSPACE_ID }} | |
| BP_TOKEN: ${{ secrets.STAGING_TOKEN_CLOUD_OPS_ACCOUNT }} | |
| run: | | |
| pnpm bp login | |
| - name: Run Zai Tests | |
| id: 'run-tests' | |
| run: | | |
| bot_id=$(pnpm bp bots new --json | jq -r ".id") | |
| echo "::set-output name=bot_id::$bot_id" | |
| export CLOUD_API_ENDPOINT='https://api.botpress.dev' | |
| export CLOUD_BOT_ID=$bot_id | |
| export CLOUD_PAT=${{ secrets.STAGING_TOKEN_CLOUD_OPS_ACCOUNT }} | |
| pnpm -F zai run test:e2e | |
| - name: Cleanup | |
| if: ${{ always() }} | |
| run: | | |
| pnpm bp bots rm ${{ steps.run-tests.outputs.bot_id }} |