Home

Awesome

xUnit Slack Reporter

GitHub MarketplaceCIcodecov

Github Action to send xUnit results to Slack.

What it does!

This action will:

What you need!

Setting up the action

The following environment variables are supported:

Environment VariableExampleDescriptionRequired?
XUNIT_PATH./results.xmlPath (relative to workspce directory) to xUnit reportY*
XUNIT_GLOB**/*.xmlGlob (relative to workspace directory) to xUnit reportsY*
SLACK_TOKEN(See Slack documentation)Slack bot user tokenY
SLACK_CHANNELCKQ7C7KJNUnique ID of slack channel to notifyY
EXIT_CODE_FROM_REPORTTrue/FalseIf present, will fail workflow if errors or failures are in the reportN
ONLY_NOTIFY_ON_ISSUESTrue/FalseIf present, will only send notifications if errors or failures are foundN

* = Either XUNIT_PATH or XUNIT_GLOB must be provided.

Sample Workflow section:

    - name: notify-tests
      uses: ivanklee86/xunit-slack-reporter@v1.4.0
      env:
        EXIT_CODE_FROM_REPORT: "True"
        SLACK_CHANNEL: CKQ7C7KJN
        SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
        XUNIT_PATH: ./results.xml
    - name: notify-tests
      uses: ivanklee86/xunit-slack-reporter@v1.4.0
      env:
        ONLY_NOTIFY_ON_ISSUES: "True"
        SLACK_CHANNEL: CKQ7C7KJN
        SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
        XUNIT_PATH: **/*.xml