Skip to content

Commit

Permalink
Setup coveralls action instead of ancient coveralls maven plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswk committed Jul 29, 2024
1 parent efef588 commit 6d6fd09
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 65 deletions.
44 changes: 13 additions & 31 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,39 @@ on:
branches:
- main



jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version: [8,11]
version: [8, 11, 17]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.version }}
cache: 'maven'
distribution: 'temurin'
cache: "maven"
distribution: "temurin"
- name: Build, test, coverage
run: ./mvnw clean test jacoco:report coveralls:report
- name: Notify Slack of pipeline completion
uses: 8398a7/action-slack@v2
run: ./mvnw clean test jacoco:report
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
status: ${{ job.status }}
author_name: Github Action
text: Build on Java ${{ matrix.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook }}
if: always()
java17:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Build, test, coverage
run: ./mvnw clean test jacoco:report coveralls:report
env:
MAVEN_OPTS: "--add-opens java.base/java.net=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"
github-token: ${{ secrets.GITHUB_TOKEN }}
allow-empty: true
base-path: src/main/java
parallel: true
flag-name: run-jvm-${{ join(matrix.*, '-') }}
- name: Notify Slack of pipeline completion
uses: 8398a7/action-slack@v2
with:
status: ${{ job.status }}
author_name: Github Action
text: Build on Java 17
text: Build on Java ${{ matrix.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook }}
if: always()
fin
27 changes: 22 additions & 5 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
on:
pull_request:


jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version: [8,11,17]
version: [8, 11, 17]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.version }}
cache: 'maven'
distribution: 'temurin'
cache: "maven"
distribution: "temurin"
- name: Build, test, coverage
run: ./mvnw clean test jacoco:report coveralls:report
run: ./mvnw clean test jacoco:report
- name: Coveralls parallel
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
allow-empty: true
flag-name: run-jvm-${{ join(matrix.*, '-') }}
parallel: true
base-path: src/main/java
finish:
needs: build
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: run-jvm-8,run-jvm-11,run-jvm-17
14 changes: 12 additions & 2 deletions .github/workflows/release_changelog.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: 'Releases'
name: "Releases"
on:
push:
tags:
- 'unleash-client-java-*'
- "unleash-client-java-*"

jobs:
release:
Expand All @@ -22,3 +22,13 @@ jobs:
body: ${{ steps.github_release.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
finish:
needs: build
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: run-jvm-8,run-jvm-11,run-jvm-17
40 changes: 13 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@

<properties>
<version.slf4j>2.0.9</version.slf4j>
<version.log4j2>2.19.0</version.log4j2>
<version.junit5>5.10.0</version.junit5>
<version.okhttp>4.10.0</version.okhttp>
<version.junit5>5.10.3</version.junit5>
<version.okhttp>4.12.0</version.okhttp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.unleash.specification>5.1.5</version.unleash.specification>
<arguments />
<version.jackson>2.14.3</version.jackson>
<version.jackson>2.17.2</version.jackson>
<version.logback>1.5.6</version.logback>
<version.gson>2.11.0</version.gson>
</properties>

<name>io.getunleash:unleash-client-java</name>
Expand Down Expand Up @@ -58,7 +59,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<version>${version.gson}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
Expand Down Expand Up @@ -104,20 +105,20 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.24.2</version>
<version>3.26.3</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.8.0</version>
<version>5.12.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>2.35.1</version>
<version>3.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -142,13 +143,13 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.3.5</version>
<version>${version.logback}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.3.5</version>
<version>${version.logback}</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -218,7 +219,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<version>0.8.12</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand All @@ -228,21 +229,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version>
<configuration>
<repoToken>Z9wVezAubEVqnGPYkOUW031cqHPve2jBz</repoToken>
</configuration>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
</dependencies>
</plugin>

<!--Download client-specifications-->
<plugin>
Expand Down Expand Up @@ -334,7 +320,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.28.0</version>
<version>2.43.0</version>
<configuration>
<formats>
<format>
Expand Down

0 comments on commit 6d6fd09

Please sign in to comment.