Skip to content
Open
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
39 changes: 21 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,55 @@ on:
pull_request:
branches:
- master
# Jobs
jobs:
test:
name: Run tests and publish test coverage
name: Test on Java ${{ matrix.java-version }}
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [11, 17, 21]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Java JDK
uses: actions/setup-java@v2
- name: Set up Java JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'adopt'
java-version: ${{ matrix.java-version }}
distribution: 'temurin'

- name: Install dependencies
run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Dgpg.skip

- name: Run tests and collect coverage
run: mvn -B test
run: mvn -B test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.java-version == 21
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
verbose: true

publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'adopt'
java-version: 11
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}

- name: Build with Maven
run: mvn clean package -B

- name: Publish package
run: |
mvn deploy -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }}
Expand Down
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencies>
Expand All @@ -54,7 +54,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>2.13.0</version>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -68,31 +68,31 @@
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.10.0</version>
<version>4.12.0</version>
</dependency>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>3.10.0</version>
<version>4.12.0</version>
</dependency>

<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20231013</version>
<version>20240303</version>
</dependency>

<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.11</version>
<version>1.17.1</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.3</version>
<version>1.12.0</version>
</dependency>

</dependencies>
Expand Down
Loading