Giter Club home page Giter Club logo

xcresulttool's Introduction

xcresulttool status

xcresulttool GitHub Action

A GitHub Action that generates a human-readable test report from the Xcode result bundle and shows it on GitHub Checks.

Screen Shot

The result is formatted into a test report that shows the success or failure of the tests, logs, activities, and saved screenshots.

Here is an example result.

Screen Shot Screen Shot

Screen Shot Screen Shot

Screen Shot Screen Shot

Pre-Requisites

This action only works on macOS builders.

By default xcodebuild will generate the xcresult bundle file to a randomly named directory in DerivedData. To use this action xcodebuild needs to generate xcresult bundle to an accessible location.

This can be done using the -resultBundlePath flag in xcodebuild.

The following action uses a script action to invoke xcodebuild and store the results in TestResults.xcresult

jobs:
  test:
    runs-on: macos-11
      - name: Run Tests
        run: |
          xcodebuild -scheme MyFramework -resultBundlePath TestResults test

Usage

For complete input/output documentation, see action.yml.

Example

- uses: kishikawakatsumi/[email protected]
  with:
    path: TestResults.xcresult
  if: success() || failure()
  # ^ This is important because the action will be run
  # even if the test fails in the previous step.
jobs:
  test:
    runs-on: macos-11
    name: Test
    steps:
      - uses: actions/checkout@v2
      - name: Test
        run: |
          xcodebuild -scheme MyFramework -resultBundlePath TestResults test

      - uses: kishikawakatsumi/[email protected]
        with:
          path: TestResults.xcresult
        if: success() || failure()
        # ^ This is important because the action will be run
        # even if the test fails in the previous step.

Multiple result bundle paths

- uses: kishikawakatsumi/[email protected]
  with:
    path: |
      results/Example.xcresult
      results/TestResult.xcresult
      results/Result.xcresult
  if: success() || failure()

Input parameters

- uses: kishikawakatsumi/[email protected]
  with:
    # Path to the xcresult bundle.
    path: 'TestResults.xcresult'

    # The GitHub authentication token to create the check.
    #
    # Default: ${{ github.token }}
    token: ''

    # Title for the check results.
    #
    # Default: 'Xcode test results'
    title:

Limitations

GitHub Checks has a maximum text limit of 65535 characters. Currently, any text longer than that will be automatically truncated.

There is a limit of 50 annotations in GitHub Checks. Currently, any annotations longer than that will be automatically truncated.

xcresulttool's People

Contributors

dependabot[bot] avatar kishikawakatsumi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.