Acumen Logs Synthetic GitHub Action

Who it's for: CI/CD engineers integrating synthetic tests into pipelines.
You’ll learn: Workflow configuration, input options, security considerations, and automation examples.

This GitHub Action lets you trigger Acumen Logs synthetic journeys directly from GitHub workflows. Use it to gate deployments, capture performance snapshots after every merge, or publish run results to observability pipelines.


Usage

Embed the action in any workflow to launch synthetic runs:

name: Run Synthetic Test

on:
  push:
    branches: [main]

jobs:
  synthetic:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Run synthetic test
        id: synthetic
        uses: deferdie/acumen-github-action/.github/actions/Synthetic@v1
        with:
          SYNTHETIC_TEST_URL: ${{ secrets.ACUMEN_SYNTHETIC_URL }}
          START_URL: https://example.com

Retrieve the run URL from the Acumen Logs dashboard (Run via API action in your synthetic test).


Inputs

Input Required Description
SYNTHETIC_TEST_URL API-trigger URL for the synthetic test (https://app.acumenlogs.com/run/watcher/<token>).
START_URL Override the journey’s startup URL (useful for staging vs production).
LOCATION Execute the run from a specific region (e.g., eu-west-1).
WAIT_FOR_COMPLETION true/false. Wait for the run to finish before continuing (default true).
FAIL_ON_WARNINGS Treat warnings (console errors, slow thresholds) as hard failures.

Check the action repository for the full set of optional parameters and defaults.


Security & Secrets

  • Store sensitive values (run URLs, auth tokens) in GitHub Actions secrets.
  • Rotate synthetic run URLs regularly and update secrets immediately after rotation.
  • Use GitHub environments with required reviewers to gate production runs.
  • Restrict workflow editing to trusted maintainers; workflow changes can expose secrets.

Outputs

The action exposes a synthetic output containing the JSON response from Acumen Logs:

{
  "id": "TEST RUN ID",
  "status": "completed",
  "token": "TEST_TOKEN",
  "running": 0,
  "has_passed": 1,
  "response_count": 14,
  "console_log_count": 3,
  "two_hundred_responses": 13,
  "three_hundred_responses": 0,
  "four_hundred_responses": 1,
  "responses": [
    {
      "url": "https://example.com",
      "status": 404
    }
  ]
}

Consume the output in later steps:

      - name: Fail deployment on synthetic failure
        if: ${{ fromJson(steps.synthetic.outputs.synthetic).has_passed == 0 }}
        run: |
          echo "Synthetic test failed" >&2
          exit 1

Examples

Notify Slack When Runs Finish

      - name: Post to Slack
        if: always()
        uses: slackapi/slack-github-action@v1
        with:
          payload: >
            {
              "text": "Synthetic run status: ${{ fromJson(steps.synthetic.outputs.synthetic).status }}"
            }
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

Record Metrics in GitHub Step Summary

      - name: Publish summary
        run: |
          RESULTS='${{ steps.synthetic.outputs.synthetic }}'
          PASSED=$(jq '.has_passed' <<< "$RESULTS")
          RESPONSES=$(jq '.response_count' <<< "$RESULTS")
          echo "/knowledge-base/1.0/github-synthetic-action## Synthetic Run" >> $GITHUB_STEP_SUMMARY
          echo "- Status: $PASSED" >> $GITHUB_STEP_SUMMARY
          echo "- Responses: $RESPONSES" >> $GITHUB_STEP_SUMMARY

Troubleshooting

  • Authentication fails: Regenerate the run URL in the dashboard and update your secret.
  • Workflow times out: Set WAIT_FOR_COMPLETION to false to trigger runs asynchronously, or extend the job timeout.
  • Inconsistent results between environments: Provide an explicit START_URL and check that environment-specific data (users, fixtures) exists.
  • Need deeper logs: Use the run token in the Acumen Logs dashboard to open the Synthetic Test Details page for console logs, screenshots, and video.

Support

For any questions or queries please email support@acumenlogs.com.


Related Guides