With Github Actions, you can now automatically run your Hamming test agents whenever you push changes to your Github repository’s main branch.

Before You Get Started

You’ll need to configure a Hamming Test Agent before setting up a workflow and take note of the Dataset ID and Agent ID. For a detailed walkthrough on how to set up a Hamming Test Agent follow this tutorial.

Step-by-Step Tutorial

1

Set Up Workflow on Github

Navigate to your Github Repo containing the code of you voice agent. Then click on Actions at the top bar and select Simple workflow from the templates. Paste the following code.

# This is a basic workflow to help you get started with Actions

name: Run Hamming Workflow

on:
  push:
    branches: [ main ]

jobs:
  run-hamming-workflow:
    uses: HammingHQ/hamming-ci-workflow/.github/workflows/hamming_run_agent.yml@main
    with:
      agent_id: ${{ vars.AGENT_ID }}
      dataset_id: ${{ vars.DATASET_ID }}
      to_number: ${{ vars.TO_NUMBER }}
    secrets:
      HAMMING_API_KEY: ${{ secrets.HAMMING_API_KEY }}

Your workflow should look like this:

2

Configure your Variables & Secrets

Navigate to your repository’s Settings on Github to set up your repository variables (agent_id, dataset_id, to_number) and repository secrets (Hamming API Key). Select Security from the left navigation bar and then select Secrets and variables.

The TO_NUMBER should be your agent’s number. This is the number Hamming’s test agent will call when running the test.

Your final variables and secrets setup should look like this:

3

Start Test Run

To test if your workflow is functioning correctly, make a change to your repository and commit it to the main branch. This should trigger the workflow. To see if you workflow is running, make sure you see a round circle next to “Add Files via Upload” in your repo (see below). Once the circle turns into a green checkmark, the workflow has been completed.

4

Monitor Workflow

To monitor your workflow, click on the circle or checkmark and it will open a new window. Click on Details and it will open the workflow page.

5

Check the results of the Test

If you set up the workflow correctly, you’ll be able to track the test calls on the Hamming Voice Agents Tab.