Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
62 changes: 62 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Java CI

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
java-version: ["8", "14", "17"]
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install JDK ${{ matrix.java-version }}
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: ${{ matrix.java-version }}
distribution: "adopt"
- name: Cache Maven repository
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ matrix.java-version }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-${{ runner.os }}-${{ matrix.java-version }}-
- name: Compile
run: ./scripts/run_no_prep_tests.sh clean test-compile
env:
CI_ARGS: "--batch-mode"
MAVEN_OPTS: "-Xmx10g -Xms1g"
- name: Run tests
run: ./scripts/run_no_prep_tests.sh test
env:
CI_ARGS: "--batch-mode"
SKIP_UNSTABLE_TESTS: 1
- name: Upload test results to Codecov
if: ${{ !cancelled() && hashFiles('**/target/surefire-reports/TEST-*.xml') != '' }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
directory: .
files: "**/target/surefire-reports/TEST-*.xml"
fail_ci_if_error: true
flags: jdk-${{ matrix.java-version }}
report_type: test_results
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage to Codecov
if: ${{ !cancelled() && startsWith(matrix.java-version, '14') && hashFiles('**/target/site/jacoco/jacoco.xml') != '' }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
files: "**/target/site/jacoco/jacoco.xml"
flags: jdk-${{ matrix.java-version }}
token: ${{ secrets.CODECOV_TOKEN }}
35 changes: 0 additions & 35 deletions .github/workflows/unit-tests-jdk-14.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/unit-tests-jdk-17.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/unit-tests-jdk-8.yml

This file was deleted.

4 changes: 2 additions & 2 deletions bolt-micronaut/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
<annotationProcessorPaths>
<annotationProcessorPaths combine.children="append">
<path>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-inject-java</artifactId>
Expand All @@ -164,7 +164,7 @@
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
<annotationProcessorPaths>
<annotationProcessorPaths combine.children="append">
<path>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-inject-java</artifactId>
Expand Down
1 change: 1 addition & 0 deletions lombok.config
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
config.stopBubbling = true
lombok.addLombokGeneratedAnnotation = true
11 changes: 9 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
see also: https://github.com/slackapi/java-slack-sdk/issues/1034
-->
<slf4j.version>1.7.36</slf4j.version>
<lombok.version>1.18.36</lombok.version>
<lombok.version>1.18.42</lombok.version>
<lombok-maven-plugin.version>1.18.20.0</lombok-maven-plugin.version>
<delombok.output>target/generated-sources-for-javadocs</delombok.output>

Expand All @@ -84,7 +84,7 @@
<!-- Maven plugins: range versioning does not work -->
<duplicate-finder-maven-plugin.version>1.3.0</duplicate-finder-maven-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven-resources-plugin.version>2.6</maven-resources-plugin.version>
Expand Down Expand Up @@ -203,6 +203,13 @@
<version>${maven-compiler-plugin.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
Expand Down
3 changes: 1 addition & 2 deletions scripts/install_local.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
is_jdk_8=`echo $JAVA_HOME | grep 8.`
is_travis_jdk_8=`echo $TRAVIS_JDK | grep openjdk8`
if [[ "${is_jdk_8}" != "" && "${is_travis_jdk_8}" != "" ]];
if [[ "${is_jdk_8}" != "" ]];
then
echo "Please use OpenJDK 11."
exit 1
Expand Down
3 changes: 1 addition & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash

is_jdk_8=$(echo "$JAVA_HOME" | grep 8.)
is_travis_jdk_8=$(echo "$TRAVIS_JDK" | grep openjdk8)
if [[ "${is_jdk_8}" != "" && "${is_travis_jdk_8}" != "" ]];
if [[ "${is_jdk_8}" != "" ]];
then
echo "Please use OpenJDK 11 for releasing these libraries."
exit 1
Expand Down
3 changes: 1 addition & 2 deletions scripts/run_all_bolt_tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
is_jdk_8=`echo $JAVA_HOME | grep 8.`
is_travis_jdk_8=`echo $TRAVIS_JDK | grep openjdk8`
if [[ "${is_jdk_8}" != "" && "${is_travis_jdk_8}" != "" ]];
if [[ "${is_jdk_8}" != "" ]];
then
echo "Please use OpenJDK 11 for running these tests."
exit 1
Expand Down
46 changes: 18 additions & 28 deletions scripts/run_no_prep_tests.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
#!/bin/bash

flags()
{
while test $# -gt 0
do
case "$1" in
-ci)
CI_OPTIONS="--batch-mode -T 1C"
;;
*) usage;;
esac
shift
done
}
flags "$@"
# Usage: ./scripts/run_no_prep_tests.sh [goals...]
#
# Arguments: Maven phases/goals to run (default: clean test)
#
# Environment variables:
# CI_ARGS - Additional Maven CLI options (e.g., "--batch-mode -T 1C")

MVN_PHASES="${*:-clean test}"

is_jdk_8=`echo $JAVA_HOME | grep 8.`
is_jdk_14=`echo $JAVA_HOME | grep 14.`

is_travis_jdk_8=`echo $TRAVIS_JDK | grep openjdk8`
if [[ "${is_jdk_8}" != "" && "${is_travis_jdk_8}" != "" ]];
if [[ "${is_jdk_8}" != "" ]];
then
./mvnw ${MAVEN_OPTS} \
./mvnw \
-pl !bolt-google-cloud-functions \
-pl !bolt-helidon \
-pl !bolt-quarkus-examples \
Expand All @@ -31,29 +24,26 @@ then
-pl !bolt-http4k \
-pl !bolt-micronaut \
-pl !slack-jakarta-socket-mode-client \
clean \
test-compile \
'-Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false test ${CI_OPTIONS} \
$MVN_PHASES \
'-Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false ${CI_ARGS} \
-DfailIfNoTests=false \
-Dhttps.protocols=TLSv1.2 \
--no-transfer-progress && \
if git status --porcelain | grep .; then git --no-pager diff; exit 1; fi
elif [[ "${is_jdk_14}" != "" ]];
then
./mvnw ${MAVEN_OPTS} \
./mvnw \
-pl !bolt-micronaut \
clean \
test-compile \
'-Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false test ${CI_OPTIONS} \
$MVN_PHASES \
'-Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false ${CI_ARGS} \
-DfailIfNoTests=false \
-Dhttps.protocols=TLSv1.2 \
--no-transfer-progress && \
if git status --porcelain | grep .; then git --no-pager diff; exit 1; fi
else
./mvnw ${MAVEN_OPTS} \
clean \
test-compile \
'-Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false test ${CI_OPTIONS} \
./mvnw \
$MVN_PHASES \
'-Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false ${CI_ARGS} \
-DfailIfNoTests=false \
-Dhttps.protocols=TLSv1.2 \
--no-transfer-progress && \
Expand Down