Skip to content

Github action to run your Swift or Obj-C tests using CI Visibility

License

Notifications You must be signed in to change notification settings

DataDog/swift-test-action

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

Swift Action for CI Visibility

GitHub Action to run your Swift or Objective-C tests automatically instrumented with CI Visibility Swift Testing framework. It supports Xcode projects as well as Swift Package Manager packages for iOS, macOS and tvOS platforms.

About Datadog Continuous Integration (CI) Visibility

CI Visibility brings together information about CI test and pipeline results plus data about CI performance, trends, and reliability, all into one place. Not only does it provide developers with the ability to dig into the reasons for a test or pipeline failure, to monitor trends in test suite execution times, or to see the effect a given commit has on the pipeline, it also gives build engineers visibility into cross-organization CI health and trends in pipeline performance over time.

Usage

  1. Set Datadog API key inside Settings > Secrets as DD_API_KEY.

  2. Set Datadog Application key inside Settings > Secrets as DD_APP_KEY.

  3. Add a step to your GitHub Actions workflow YAML that uses this action:

    steps:
      - name: Checkout
        uses: actions/checkout@v3
     - name: Run tests with Datadog 
       uses: Datadog/swift-test-action@v1
       with:
           api_key: ${{ secrets.DD_API_KEY }}
           app_key: ${{ secrets.DD_APP_KEY }}

Configuration

These are the optional parameters of the action:

platform: Platform to run: "ios", "macos" or "tvos". By default: "ios"
workspace: .xcworkspace file, if not set, workspace will be autoselected
project: .xcodeproj file, if not set, project will be autoselected
scheme: Scheme to test, if not set, scheme will be autoselected
sdk: SDK used for building, by default: "iphonesimulator" will be used
destination: Destination for testing, by default: "platform=iOS Simulator,name=iPhone 13"
configuration: Configuration for testing, by default: "Debug"
libraryVersion: Version of the Datagog SDK testing framework to use for testing, by default the latest stable
extraParameters: These input will be added directly to the build/test command

There are also extra configuration values that can be set using environment values to the action as specified in the Swift framework documentation

About

Github action to run your Swift or Obj-C tests using CI Visibility

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •