Added CircleCI

This commit is contained in:
Erik C. Thauvin 2022-09-26 16:50:31 -07:00
parent 6925d68db7
commit e39514bcd7
2 changed files with 55 additions and 2 deletions

53
.circleci/config.yml Normal file
View 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

View file

@ -1,7 +1,7 @@
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) <!-- [![Release](https://img.shields.io/github/release/ethauvin/jokeapi.svg)](https://github.com/ethauvin/jokeapi/releases/latest) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/jokeapi/badge.svg?color=blue)](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/jokeapi) --> [![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/jokeapi?server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/jokeapi/) [![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) <!-- [![Release](https://img.shields.io/github/release/ethauvin/jokeapi.svg)](https://github.com/ethauvin/jokeapi/releases/latest) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/jokeapi/badge.svg?color=blue)](https://maven-badges.herokuapp.com/maven-central/net.thauvin.erik/jokeapi) --> [![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/jokeapi?server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/jokeapi/)
<!-- [![Known Vulnerabilities](https://snyk.io/test/github/ethauvin/jokeapi/badge.svg?targetFile=pom.xml)](https://snyk.io/test/github/ethauvin/jokeapi?targetFile=pom.xml) --> <!-- [![Known Vulnerabilities](https://snyk.io/test/github/ethauvin/jokeapi/badge.svg?targetFile=pom.xml)](https://snyk.io/test/github/ethauvin/jokeapi?targetFile=pom.xml) -->
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_jokeapi&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_jokeapi) [![GitHub CI](https://github.com/ethauvin/jokeapi/actions/workflows/gradle.yml/badge.svg)](https://github.com/ethauvin/jokeapi/actions/workflows/gradle.yml) <!-- [![CircleCI](https://circleci.com/gh/ethauvin/jokeapi/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/jokeapi/tree/master) --> [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_jokeapi&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_jokeapi) [![GitHub CI](https://github.com/ethauvin/jokeapi/actions/workflows/gradle.yml/badge.svg)](https://github.com/ethauvin/jokeapi/actions/workflows/gradle.yml) [![CircleCI](https://circleci.com/gh/ethauvin/jokeapi/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/jokeapi/tree/master)
# JokeAPI for Kotlin/Java # JokeAPI for Kotlin/Java
@ -109,7 +109,7 @@ var config = new JokeConfig.Builder()
.safe(true) .safe(true)
.build(); .build();
var joke = JokeApi.getJoke(config); var joke = JokeApi.getJoke(config);
for (String j : joke.getJoke()) { for (var j : joke.getJoke()) {
System.out.println(j); System.out.println(j);
} }
``` ```