Skip to content

Github Action to send XUnit results to Slack ๐ŸŽ™๏ธ๐ŸŽ™๏ธ๐ŸŽ™๏ธ

License

Notifications You must be signed in to change notification settings

mikedizon/xunit-slack-reporter

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

66 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

xUnit Slack Reporter

Github Action to send xUnit results to Slack.

What it does!

This action will:

  • Parse a xUnit-style XML report.
  • Send summary to Slack workspace & channel of your choice.
  • (Optional) Fail the build if errors or failures are found.

What you need!

Setting up the action

The following environment variables are supported:

Environment Variable Description Required?
XUNIT_PATH Path (relative to workspce directory) to xUnit report Y
SLACK_TOKEN Slack bot user token Y
SLACK_CHANNEL Unique ID of slack channel to notify Y
EXIT_CODE_FROM_REPORT If present, will fail workflow if errors or failures are in the report N

Sample Workflow section:

action "testsnotify" {
  needs = "tests"
  uses = "ivanklee86/xunit-slack-reporter@master"
  env = {
    SLACK_CHANNEL = "AAAAAAAA"
    XUNIT_PATH = "./results.xml"
    EXIT_CODE_FROM_REPORT = "True"
  },
  secrets = ["SLACK_TOKEN"]
}

    - name: notify-tests
      uses: ./
      env:
        EXIT_CODE_FROM_REPORT: "True"
        SLACK_CHANNEL: CKQ7C7KJN
        SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
        XUNIT_PATH: ./results.xml

About

Github Action to send XUnit results to Slack ๐ŸŽ™๏ธ๐ŸŽ™๏ธ๐ŸŽ™๏ธ

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 67.3%
  • Dockerfile 11.2%
  • HCL 10.7%
  • Makefile 10.4%
  • Shell 0.4%