Skip to content

v0.0.19

Compare
Choose a tag to compare
@fmck3516 fmck3516 released this 11 Apr 13:09
· 7 commits to main since this release

Highlights

This release introduces the SkippyRepositoryExtension interface. It allows projects to customize the way Skippy reads and writes data.

Skippy's default behavior:

  • It stores and retrieves all data in / from the .skippy folder.
  • It only retains the latest Test Impact Analysis and.
  • It only retains the JaCoCo execution data files that are referenced by the latest Test Impact Analysis.

The default settings are designed for small projects that do not require code coverage reports, and thus, do not store JaCoCo execution data files. Those projects will typically disable the coverageForSkippedTests setting. While these defaults support projects of any size and allow for the storage of JaCoCo data files for experimental purposes, they are not recommended for large projects or those needing to store such files long-term. Doing so could significantly increase the size of your Git repository.

Large projects aiming to store and permanently retain Test Impact Analysis instances and JaCoCo execution data files can register a custom SkippyRepositoryExtension. This extension enables the storage of these artifacts outside the project’s repository using systems such as databases, network file systems, or blob storage solutions like AWS S3.

Example for a custom SkippyRepositoryExtension: FileSystemBackedRepositoryExtension

Gradle Configuration

To enable this feature in Gradle, add the following to your build.gradle file:

buildscript {    
    dependencies {
        classpath 'com.example:my-repository-extension:1.0.0'
    }
}

skippy {
    repository = 'com.example.MyRepositoryExtension'
}

dependencies {
    testImplementation 'com.example:my-repository-extension:1.0.0'
}

Maven Configuration

To enable this feature in Maven, add the following to your pom.xml file:

  <dependencies>
    <dependency>
      <groupId>com.example</groupId>
      <artifactId>my-repository-extension</artifactId>
      <version>1.0.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <plugin>
    <groupId>io.skippy</groupId>
    <artifactId>skippy-maven</artifactId>
    <dependencies>
      <dependency>
        <groupId>com.example</groupId>
        <artifactId>my-repository-extension</artifactId>
        <version>1.0.0</version>
      </dependency>
    </dependencies>
    <configuration>
      <repository>com.example.MyRepositoryExtension</repository>
    </configuration>
  </plugin>

Other noteworthy changes

The setting saveExecutionData has been renamed to coverageForSkippedTest to highlight the purpose instead of the implementation details.

Gradle example:

skippy {
    coverageForSkippedTests = true
}

Maven example:

<plugin>
  <groupId>io.skippy</groupId>  
  <artifactId>skippy-maven</artifactId>
  ...
  <configuration>
    <coverageForSkippedTest>true</coverageForSkippedTest>
  </configuration>
  ...   
</plugin>

Resolved Issues

  • #150: Allow projects to customize SkippyRepository's default behavior