### Cekura Action: Combine Tags and Scenario IDs Source: https://github.com/cekura-ai/cekura-github-actions/blob/main/README.md This example demonstrates how to run Cekura tests using both scenario IDs and tags. It requires `vars.AGENT_ID`, `vars.SCENARIO_IDS`, `vars.TAGS`, and `secrets.CEKURA_API_KEY`. ```yaml - name: Run Cekura Tests uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.AGENT_ID }} scenario_ids: ${{ vars.SCENARIO_IDS }} tags: ${{ vars.TAGS }} api_key: ${{ secrets.CEKURA_API_KEY }} ``` -------------------------------- ### Direct API Call: Poll for Results Source: https://context7.com/cekura-ai/cekura-github-actions/llms.txt Polls for test run results using a `curl` GET request to the Cekura REST API. Replace the placeholder ID with the actual result ID obtained from triggering a run. ```bash # Poll for results (replace 9871 with the returned id) curl -s -X GET "https://api.cekura.ai/test_framework/v1/results/9871/" \ -H "X-CEKURA-API-KEY: your_api_key_here" ``` -------------------------------- ### Basic Workflow: Run Agent Tests on Push and PR Source: https://context7.com/cekura-ai/cekura-github-actions/llms.txt This is a minimal workflow configuration to run agent tests on every push to the main branch and on every pull request. Ensure repository variables for AGENT_ID and SCENARIO_IDS, and a repository secret for CEKURA_API_KEY are set. ```yaml # .github/workflows/test-agents.yml name: Agent Tests on: push: branches: [main] pull_request: jobs: run-simulation-tests: runs-on: ubuntu-latest steps: - name: Cekura Run Tests uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.AGENT_ID }} # Repository variable scenario_ids: ${{ vars.SCENARIO_IDS }} # e.g., "123,456,789" api_key: ${{ secrets.CEKURA_API_KEY }} # Repository secret # Expected log output: # ========================================== # Cekura Test Framework # ========================================== # Configuration: # Agent ID: agent-abc123 # API URL: https://api.cekura.ai # Starting test execution... # Test run initiated successfully # Result ID: 9871 # Monitoring test execution... # [30s] Status: running # [60s] Status: running # [90s] Status: completed # ========================================== # Test execution completed # ========================================== # Summary: # Total Duration: 1m 12s # Total Runs: 3 # Completed: 3 # Success: 3 # Failed: 0 # Success Rate: 100.0% # ✅ All tests passed successfully ``` -------------------------------- ### Multi-Environment Sequential Testing Source: https://context7.com/cekura-ai/cekura-github-actions/llms.txt Gates production tests behind a successful staging run using job dependencies. The `needs` keyword ensures sequential execution. ```yaml name: Environment Tests on: push: branches: [main] jobs: staging-tests: runs-on: ubuntu-latest steps: - name: Test Staging Environment uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.STAGING_AGENT_ID }} tags: 'smoke-test' api_url: 'https://staging-api.cekura.ai' api_key: ${{ secrets.STAGING_API_KEY }} production-tests: runs-on: ubuntu-latest needs: staging-tests # Only runs if staging-tests succeeds steps: - name: Test Production Environment uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.PROD_AGENT_ID }} tags: 'smoke-test' api_key: ${{ secrets.PROD_API_KEY }} ``` -------------------------------- ### Basic Cekura GitHub Actions Workflow Source: https://github.com/cekura-ai/cekura-github-actions/blob/main/README.md This workflow file sets up a GitHub Action to run Cekura tests. It can be triggered manually, on push, or on pull request. It uses repository secrets and variables for configuration. ```yaml name: Agent Tests on: workflow_dispatch: inputs: agent_id: description: 'The agent identifier' required: false type: string scenario_ids: description: 'Comma-separated scenario IDs (e.g., "123,456,789")' required: false type: string api_url: description: 'Custom Cekura API endpoint' required: false type: string default: 'https://api.cekura.ai' push: branches: [main] pull_request: jobs: run-simulation-tests: runs-on: ubuntu-latest steps: - name: Cekura Run Tests uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ inputs.agent_id || vars.AGENT_ID }} scenario_ids: ${{ inputs.scenario_ids || vars.SCENARIO_IDS }} api_url: ${{ inputs.api_url || vars.API_URL }} api_key: ${{ secrets.CEKURA_API_KEY }} ``` -------------------------------- ### Create Shareable Link Token Source: https://context7.com/cekura-ai/cekura-github-actions/llms.txt Use this curl command to generate a shareable link for test results that is valid for a specified duration. Replace 'your_api_key_here' with your actual API key and adjust the 'expire_at' timestamp as needed. ```bash curl -s -X POST "https://api.cekura.ai/test_framework/v1/results/9871/create_shareable_link_token/" \ -H "X-CEKURA-API-KEY: your_api_key_here" \ -H "Content-Type: application/json" \ -d '{"expire_at": "2024-12-31T00:00:00Z"}' ``` -------------------------------- ### Test Staging and Production Environments in GitHub Actions Source: https://github.com/cekura-ai/cekura-github-actions/blob/main/README.md Use this configuration to run tests against staging and production environments within the same GitHub Actions workflow. Ensure that the necessary agent IDs, API keys, and API URLs are correctly configured as secrets or variables. ```yaml jobs: staging-tests: runs-on: ubuntu-latest steps: - name: Test Staging uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.STAGING_AGENT_ID }} tags: 'smoke-test' api_url: 'https://staging-api.cekura.ai' api_key: ${{ secrets.STAGING_API_KEY }} production-tests: runs-on: ubuntu-latest needs: staging-tests steps: - name: Test Production uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.PROD_AGENT_ID }} tags: 'smoke-test' api_key: ${{ secrets.PROD_API_KEY }} ``` -------------------------------- ### Manual Trigger with Workflow Dispatch Inputs Source: https://context7.com/cekura-ai/cekura-github-actions/llms.txt Allows manual triggering of test runs from the GitHub Actions UI with runtime parameters. Define inputs in the `workflow_dispatch` section. ```yaml name: Manual Agent Tests on: workflow_dispatch: inputs: agent_id: description: 'Agent identifier' required: false type: string scenario_ids: description: 'Comma-separated scenario IDs (e.g., "123,456,789")' required: false type: string api_url: description: 'Custom Cekura API endpoint' required: false type: string default: 'https://api.cekura.ai' jobs: run-simulation-tests: runs-on: ubuntu-latest steps: - name: Cekura Run Tests uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ inputs.agent_id || vars.AGENT_ID }} scenario_ids: ${{ inputs.scenario_ids || vars.SCENARIO_IDS }} api_url: ${{ inputs.api_url || vars.API_URL }} api_key: ${{ secrets.CEKURA_API_KEY }} ``` -------------------------------- ### Run Targeted Tests by Tags and Scenario IDs Source: https://context7.com/cekura-ai/cekura-github-actions/llms.txt This configuration combines specific scenario IDs with scenarios filtered by tags. It ensures that the explicitly listed scenario IDs are always included, along with any scenarios matching the provided tags. ```yaml - name: Run Targeted Tests uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.AGENT_ID }} scenario_ids: "101,102" # Always include these specific scenarios tags: "regression" # Plus all scenarios tagged "regression" api_key: ${{ secrets.CEKURA_API_KEY }} ``` -------------------------------- ### Cekura Action: Test Scenarios by Tags Source: https://github.com/cekura-ai/cekura-github-actions/blob/main/README.md This configuration runs Cekura tests for all scenarios associated with the specified tags. It requires `vars.AGENT_ID`, `vars.TAGS`, and `secrets.CEKURA_API_KEY` to be set. ```yaml - name: Run Cekura Tests uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.AGENT_ID }} tags: ${{ vars.TAGS }} api_key: ${{ secrets.CEKURA_API_KEY }} ``` -------------------------------- ### Run Smoke Tests by Tag Source: https://context7.com/cekura-ai/cekura-github-actions/llms.txt This workflow filters and runs all scenarios that share specific tags, such as 'smoke-test' or 'critical'. It requires the agent ID and API key to be configured. ```yaml name: Smoke Tests on: push: branches: [main] jobs: smoke: runs-on: ubuntu-latest steps: - name: Run Smoke Tests uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.AGENT_ID }} tags: "smoke-test,critical" # Run all scenarios tagged smoke-test OR critical api_key: ${{ secrets.CEKURA_API_KEY }} ``` -------------------------------- ### Scheduled Nightly Test Run Source: https://context7.com/cekura-ai/cekura-github-actions/llms.txt Executes a regression suite automatically on a cron schedule. Configure the schedule using the `cron` syntax. ```yaml name: Nightly Regression Tests on: schedule: - cron: '0 2 * * *' # 2:00 AM UTC daily jobs: nightly: runs-on: ubuntu-latest steps: - name: Run Regression Suite uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.AGENT_ID }} tags: 'regression' frequency: '3' # Run each scenario 3 times for reliability timeout: '7200' # Allow up to 2 hours api_key: ${{ secrets.CEKURA_API_KEY }} ``` -------------------------------- ### Direct API Call: Trigger Test Run Source: https://context7.com/cekura-ai/cekura-github-actions/llms.txt Triggers a test run using a direct `curl` command to the Cekura REST API. This is useful for scripting outside of GitHub Actions. ```bash # Trigger a test run curl -s -X POST "https://api.cekura.ai/test_framework/v1/scenarios/run_scenarios/" \ -H "X-CEKURA-API-KEY: your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "agent_id": "agent-abc123", "scenarios": [101, 102, 103], "tags": ["smoke-test"], "frequency": 1, "name": "Manual CI run" }' # Response: {"id": 9871, ...} ``` -------------------------------- ### Cekura Action: Test Specific Scenarios by ID Source: https://github.com/cekura-ai/cekura-github-actions/blob/main/README.md Use this snippet to run Cekura tests for specific scenarios identified by their IDs. Ensure `vars.AGENT_ID` and `vars.SCENARIO_IDS` are set in your repository variables and `secrets.CEKURA_API_KEY` is configured. ```yaml - name: Run Cekura Tests uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.AGENT_ID }} scenario_ids: ${{ vars.SCENARIO_IDS }} api_key: ${{ secrets.CEKURA_API_KEY }} ``` -------------------------------- ### Cekura Action: Manual Workflow Trigger Source: https://github.com/cekura-ai/cekura-github-actions/blob/main/README.md This workflow allows manual triggering of Cekura tests from the GitHub Actions tab. It accepts `agent_id` and `scenario_ids` as inputs, falling back to repository variables if not provided. ```yaml name: Manual Tests on: workflow_dispatch: inputs: agent_id: description: 'The agent identifier' required: false type: string scenario_ids: description: 'Comma-separated scenario IDs (e.g., "123,456,789")' required: false type: string jobs: run-simulation-tests: runs-on: ubuntu-latest steps: - name: Run Cekura Tests uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ inputs.agent_id || vars.AGENT_ID }} scenario_ids: ${{ inputs.scenario_ids || vars.SCENARIO_IDS }} api_key: ${{ secrets.CEKURA_API_KEY }} ``` -------------------------------- ### Consuming Action Outputs Source: https://context7.com/cekura-ai/cekura-github-actions/llms.txt Captures `result_id` and `result_url` from the action for use in downstream steps. Use `if: always()` to ensure execution even on failure. ```yaml jobs: test-and-report: runs-on: ubuntu-latest steps: - name: Run Cekura Tests id: cekura # Give the step an ID to reference its outputs uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.AGENT_ID }} scenario_ids: ${{ vars.SCENARIO_IDS }} api_key: ${{ secrets.CEKURA_API_KEY }} - name: Print Result Details if: always() # Run even if tests failed run: | echo "Test Result ID : ${{ steps.cekura.outputs.result_id }}" echo "Results URL : ${{ steps.cekura.outputs.result_url }}" - name: Notify Slack on Failure if: failure() run: | curl -X POST "${{ secrets.SLACK_WEBHOOK }}" \ -H "Content-Type: application/json" \ -d "{\"text\":\"❌ Agent tests failed. View results: ${{ steps.cekura.outputs.result_url }}\"}" ``` -------------------------------- ### Cekura Action: Scheduled Testing Source: https://github.com/cekura-ai/cekura-github-actions/blob/main/README.md This workflow is configured to run Cekura tests automatically on a daily schedule at 2 AM. It tests scenarios tagged with 'regression'. ```yaml name: Nightly Tests on: schedule: - cron: '0 2 * * *' # Run at 2 AM daily jobs: run-simulation-tests: runs-on: ubuntu-latest steps: - name: Run Cekura Tests uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.AGENT_ID }} tags: 'regression' api_key: ${{ secrets.CEKURA_API_KEY }} ``` -------------------------------- ### Cekura Action: Test Agents Making Outbound Calls Source: https://github.com/cekura-ai/cekura-github-actions/blob/main/README.md Configure Cekura tests for agents that make outbound calls, specifying a phone number for testing. This requires `vars.AGENT_ID`, `vars.SCENARIO_IDS`, `vars.PHONE_NUMBER`, and `secrets.CEKURA_API_KEY`. ```yaml - name: Run Cekura Tests uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.AGENT_ID }} scenario_ids: ${{ vars.SCENARIO_IDS }} phone_number: ${{ vars.PHONE_NUMBER }} api_key: ${{ secrets.CEKURA_API_KEY }} ``` -------------------------------- ### Testing Outbound Call Agents Source: https://context7.com/cekura-ai/cekura-github-actions/llms.txt Tests agents that place outbound telephone calls by providing a `phone_number`. Ensure the `phone_number` is correctly formatted. ```yaml - name: Test Outbound Call Agent uses: cekura-ai/cekura-github-actions@v1.0.0 with: agent_id: ${{ vars.AGENT_ID }} scenario_ids: ${{ vars.SCENARIO_IDS }} phone_number: ${{ vars.PHONE_NUMBER }} # e.g., "+15551234567" api_key: ${{ secrets.CEKURA_API_KEY }} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.