Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup coveralls action instead of ancient coveralls maven plugin #249

Merged
merged 4 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 21 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,31 @@ 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
run: ./mvnw clean test jacoco:report
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
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:
Expand All @@ -34,28 +40,18 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook }}
if: always()
java17:
finish:
needs: build
if: ${{ always() }}
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"
- name: Notify Slack of pipeline completion
uses: 8398a7/action-slack@v2
fetch-depth: 0
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
status: ${{ job.status }}
author_name: Github Action
text: Build on Java 17
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook }}
if: always()
parallel-finished: true
carryforward: run-jvm-8,run-jvm-11,run-jvm-17

32 changes: 27 additions & 5 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,43 @@
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: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- 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
42 changes: 14 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
<version>9.2.4-SNAPSHOT</version>

<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.slf4j>2.0.13</version.slf4j>
<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.3.14</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>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>2.35.1</version>
<version>2.35.2</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.30.0</version>
<configuration>
<formats>
<format>
Expand Down