Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

dev.katsute.jcore 1.3.0

Install 1/2: Add this to pom.xml:
Learn more about Maven or Gradle
<dependency>
  <groupId>dev.katsute</groupId>
  <artifactId>jcore</artifactId>
  <version>1.3.0</version>
</dependency>
Install 2/2: Run via command line
$ mvn install

About this package

You do not have to authenticate with GitHub to use this package, binaries are available on Maven Central https://mvnrepository.com/artifact/dev.katsute/jcore

JCore - Java library for GitHub workflow commands

DocumentationIssues

Java CI Deploy Maven Central version license

Overview

jCore supports most GitHub workflow commands.

  • Inputs
    Workflow.getInput("input")
  • Logging
    Workflow.info("info");
    Workflow.debug("debug");
    Workflow.notice("notice");
    Workflow.warning("warning");
    Workflow.error("error");
  • AnnotationProperties
    new AnnotationProperties.Builder()
       .title("A title")
       .startColumn(1)
       .endColumn(2)
       .startLine(3)
       .endLine(4)
       .build()
  • Groups
    Workflow.startGroup("my-group");
  • Secret masking
    Workflow.addMask("secret value");

View all features in the documentation

JUnit Integration

Add jCore to your JUnit test cases in order to see failures as annotations.

❌ without jCore

Assertions.assertTrue(false, "expected expression to be true");

Assumptions.assumeTrue(false, "expected expression to be true");
  • no warning messages
  • requires reading maven log to find warnings and errors

✔ with jCore

Assertions.assertTrue(false, Workflow.errorSupplier("expected expression to be true"));

Assumptions.assumeTrue(false, Workflow.warningSupplier("expected expression to be true"));
  • annotations show warnings and errors
  • full stack traces in annotations
  • direct links to line error

Contributing

  • Found a bug? Post it in issues.
  • Want to further expand our project? Fork this repository and submit a pull request.