Added CircleCI
This commit is contained in:
parent
6925d68db7
commit
e39514bcd7
2 changed files with 55 additions and 2 deletions
53
.circleci/config.yml
Normal file
53
.circleci/config.yml
Normal file
|
@ -0,0 +1,53 @@
|
|||
version: 2
|
||||
defaults: &defaults
|
||||
working_directory: ~/repo
|
||||
environment:
|
||||
JVM_OPTS: -Xmx3200m
|
||||
TERM: dumb
|
||||
CI: true
|
||||
|
||||
defaults_gradle: &defaults_gradle
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- gradle-dependencies-{{ checksum "build.gradle.kts" }}
|
||||
# fallback to using the latest cache if no exact match is found
|
||||
- gradle-dependencies-
|
||||
- run:
|
||||
name: Gradle Dependencies
|
||||
command: ./gradlew dependencies
|
||||
- save_cache:
|
||||
paths: ~/.m2
|
||||
key: gradle-dependencies-{{ checksum "build.gradle.kts" }}
|
||||
- run:
|
||||
name: Run All Checks
|
||||
command: ./gradlew check
|
||||
- store_artifacts:
|
||||
path: build/reports/
|
||||
destination: reports
|
||||
- store_test_results:
|
||||
path: build/reports/
|
||||
jobs:
|
||||
build_gradle_jdk19:
|
||||
<<: *defaults
|
||||
|
||||
docker:
|
||||
- image: cimg/openjdk:19.0
|
||||
|
||||
<<: *defaults_gradle
|
||||
|
||||
build_gradle_jdk11:
|
||||
<<: *defaults
|
||||
|
||||
docker:
|
||||
- image: cimg/openjdk:11.0
|
||||
|
||||
<<: *defaults_gradle
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
gradle:
|
||||
jobs:
|
||||
- build_gradle_jdk11
|
||||
- build_gradle_jdk19
|
|
@ -1,7 +1,7 @@
|
|||
[](https://opensource.org/licenses/BSD-3-Clause) <!-- [](https://github.com/ethauvin/jokeapi/releases/latest) [](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/jokeapi) --> [](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/jokeapi/)
|
||||
|
||||
<!-- [](https://snyk.io/test/github/ethauvin/jokeapi?targetFile=pom.xml) -->
|
||||
[](https://sonarcloud.io/dashboard?id=ethauvin_jokeapi) [](https://github.com/ethauvin/jokeapi/actions/workflows/gradle.yml) <!-- [](https://circleci.com/gh/ethauvin/jokeapi/tree/master) -->
|
||||
[](https://sonarcloud.io/dashboard?id=ethauvin_jokeapi) [](https://github.com/ethauvin/jokeapi/actions/workflows/gradle.yml) [](https://circleci.com/gh/ethauvin/jokeapi/tree/master)
|
||||
|
||||
# JokeAPI for Kotlin/Java
|
||||
|
||||
|
@ -109,7 +109,7 @@ var config = new JokeConfig.Builder()
|
|||
.safe(true)
|
||||
.build();
|
||||
var joke = JokeApi.getJoke(config);
|
||||
for (String j : joke.getJoke()) {
|
||||
for (var j : joke.getJoke()) {
|
||||
System.out.println(j);
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue