Skip to content

test-results-reporter/publish

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

logo

TestBeats Publish GitHub Action

CI Check dist/ CodeQL Coverage

Stars

GitHub Action for testbeats publish command.

Read more about the project at https://testbeats.com

How to use TestBeats Publish GitHub Action

Below is an example of Testbeats action in a workflow file. To include the action in a workflow, you can use the uses syntax with the @ symbol to reference a specific branch, tag, or commit hash.

Example Workflow using config file

# .github/workflows/testbeats.yml
# This workflow will publish test results to slack
steps:
  - name: Checkout
    id: checkout
    uses: actions/checkout@v4

  - name: Install Dependencies
    id: npm-ci
    run: npm ci

  - name: Test
    id: npm-ci-test
    run: npm run test

  - name: TestBeats Publish
    uses: test-results-reporter/publish@v1
    with:
      config: .testbeats.json # TestBeats configuration file path

Example Workflow using CLI params

# .github/workflows/testbeats.yml
# This workflow will publish test results to slack including CI info and chart test summary
steps:
  - name: Checkout
    id: checkout
    uses: actions/checkout@v4

  - name: Install Dependencies
    id: npm-ci
    run: npm ci

  - name: Test
    id: npm-ci-test
    run: npm run test

  - name: TestBeats Publish
    uses: test-results-reporter/publish@v1
    with:
      slack: ${{ secrets.SLACK_WEBHOOK_URL }}
      mocha: ./test/mocha/results.xml
      ci-info: true
      chart-test-summary: true

Example Workflow using CLI params and testbeats api key

# .github/workflows/testbeats.yml
# This workflow will publish test results to TestBeats
steps:
  - name: Checkout
    id: checkout
    uses: actions/checkout@v4

  - name: Install Dependencies
    id: npm-ci
    run: npm ci

  - name: Test
    id: npm-ci-test
    run: npm run test

  - name: TestBeats Publish
    uses: test-results-reporter/publish@v1
    with:
      slack: ${{ secrets.SLACK_WEBHOOK_URL }}
      mocha: ./test/mocha/results.xml
      api-key: ${{ secrets.TESTBEATS_API_KEY }}
      project: ${{ github.repository }} # Optional
      run: ${{ github.branch_name }} # Optional

Support

Like this project! ⭐ Star it on Github and follow on Twitter. Your support means a lot to us.

Contributors

If you've ever wanted to contribute to open source, and a great cause, now is your chance! See the contributing docs for more information.

Thanks to all the people who contribute.