Skip to content
check-square

GitHub Action

Scope for Gradle

v1 Latest version
Use latest version
check-square

Scope for Gradle

Automatically instruments and run your tests using Scope Java agent

Installation

Copy and paste the following snippet into your .yml file.

- name: Scope for Gradle
  uses: undefinedlabs/scope-for-gradle-action@v1
Learn more about this action in undefinedlabs/scope-for-gradle-action
Choose a version

logo

Scope for Gradle Action

GitHub Action to run your tests automatically instrumented with the Scope Java agent.

About Scope

Scope gives developers production-level visibility on every test for every app – spanning mobile, monoliths, and microservices.

Usage

  1. Set Scope DSN inside Settings > Secrets as SCOPE_DSN.
  2. Add a step to your GitHub Actions workflow YAML that uses this action:
steps:
  - uses: actions/checkout@master
  - name: Set up JDK 1.8
    uses: actions/setup-java@v1
    with:
      java-version: 1.8 
  - name: Scope for Gradle Action
    uses: undefinedlabs/scope-for-gradle-action@v1
    with:
      dsn: ${{secrets.SCOPE_DSN}} # required
      run-tests: true # optional - default is 'true'
      command: ./gradlew test # optional - default is './gradlew test'

Manual test command

If you want to execute the test command manually, it is needed to add the --init-script initscope.gradle option to the run step.

steps:
  - uses: actions/checkout@master
  - name: Set up JDK 1.8
    uses: actions/setup-java@v1
    with:
      java-version: 1.8 
  - name: Scope for Gradle Action
    uses: undefinedlabs/scope-for-gradle-action@v1
    with:
      dsn: ${{secrets.SCOPE_DSN}} # required
      run-tests: false
  - name: Gradle Build
    run: ./gradlew build --init-script initscope.gradle
You can’t perform that action at this time.