Skip to content

[pull] master from botpress:master #370

[pull] master from botpress:master

[pull] master from botpress:master #370

name: Run Cognitive Tests
on:
pull_request:
paths:
- 'packages/cognitive/**'
- '.github/workflows/run-cognitive-tests.yml'
permissions:
id-token: write
contents: read
jobs:
run-cognitive-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/cognitive'
- 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 Cognitive 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 cognitive run test:e2e
- name: Cleanup
if: ${{ always() }}
run: |
pnpm bp bots rm ${{ steps.run-tests.outputs.bot_id }}