h1alexbel / ghquota

JUnit extension that won't run your tests if request quota in GitHub is exceeded

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logo

EO principles respected here DevOps By Rultor.com We recommend IntelliJ IDEA

mvn maven central javadoc

Hits-of-Code Lines-of-Code PDD status License

JUnit extension that won't run your tests if request quota in GitHub is exceeded.

How to use. All you need is this (get the latest version here):

Maven:

<dependency>
  <groupId>io.github.h1alexbel</groupId>
  <artifactId>ghquota</artifactId>
  <scope>test</scope>
</dependency>

Gradle:

dependencies {
    testCompile 'io.github.h1alexbel:ghquota:<version>'
}
import java.net.URL;
import io.github.h1alexbel.ghquota.QuotaIsFine;

@Test
@ExtendWith(QuotaIsFine.class)
void readsContentInRealGitHub() {
    new URL("api.github.com/repos/h1alexbel/ghquota").getContent();
}

We don't want this unit test to be executed when GitHub Quota API is exceeded. The Quota execution condition will prevent JUnit5 from executing the test when you are out of requests.

How to Contribute

It's a Java project. You will need to install Maven 3.8.7+ Java 17+.

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

$ mvn clean install

About

JUnit extension that won't run your tests if request quota in GitHub is exceeded

License:MIT License


Languages

Language:Java 100.0%