Skip to content

Verify Instrumentation #404

Verify Instrumentation

Verify Instrumentation #404

name: Verify Instrumentation
on:
workflow_dispatch:
inputs:
agent-ref:
required: true
default: main
type: string
description: 'The ref (branch, SHA, tag?) to run the tests on'
workflow_call:
inputs:
agent-ref:
required: true
default: main
type: string
description: 'The ref (branch, SHA, tag?) to run the tests on'
schedule:
- cron: '0 8 * * MON-FRI'
jobs:
# build the agent and saves Gradle's cache so all modules can use the cache
build-agent:
name: Build agent
uses: ./.github/workflows/X-Reusable-BuildAgent.yml
with:
agent-ref: ${{ inputs.agent-ref || 'main' }}
gradle-cache-read-only: ${{ github.event_name != 'schedule' }}
secrets: inherit
# GHA Matrix strategy only allows 255 entries.
# So 2 pages should be good until we have around 500 instrumentation modules
# When we grow to more than that, we'll need to create a third job here and have pages 1/3, 2/3 and 3/3
# Also, this new job must be listed in the `needs` for notify-failure
verify-instrumentation-1:
name: Page 1/2
needs: build-agent
uses: ./.github/workflows/X-Reusable-VerifyInstrumentation.yml
with:
page: 1/2
ref: ${{ inputs.agent-ref || 'main' }}
secrets: inherit
verify-instrumentation-2:
name: Page 2/2
needs: build-agent
uses: ./.github/workflows/X-Reusable-VerifyInstrumentation.yml
with:
page: 2/2
ref: ${{ inputs.agent-ref || 'main' }}
secrets: inherit
notify-failure:
needs: [ verify-instrumentation-1, verify-instrumentation-2 ]
if: ${{ failure() }}
runs-on: ubuntu-20.04
steps:
- name: Send failure message to Slack
id: slack
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # [email protected]
with:
payload: |
{
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}