From 1cf357eecf88e2837b12b72b03a021e54e0eefd1 Mon Sep 17 00:00:00 2001
From: petruki <31597636+petruki@users.noreply.github.com>
Date: Thu, 14 Aug 2025 20:50:13 -0700
Subject: [PATCH 1/7] Fixes #360 - updated reflect-config.json reachability
metadata
---
pom.xml | 2 +-
.../com/switcherapi/client/model/Entry.java | 16 +++---
.../client/model/SwitcherBuilder.java | 2 +-
.../switcher-client/reflect-config.json | 49 ++++++++++++++--
.../client/SwitcherLocal1Test.java | 22 +++----
.../client/SwitcherLocal3Test.java | 2 +-
.../switcherapi/client/model/ModelTest.java | 4 +-
.../nativeimage/NativeReflectConfigTest.java | 57 ++++++++++++++++++-
8 files changed, 124 insertions(+), 30 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1bbb0aa..a87ab88 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
com.switcherapi
switcher-client
jar
- 2.4.0
+ 2.4.1-SNAPSHOT
Switcher Client
Switcher Client SDK for working with Switcher API
diff --git a/src/main/java/com/switcherapi/client/model/Entry.java b/src/main/java/com/switcherapi/client/model/Entry.java
index 56d8e29..ba3f38a 100644
--- a/src/main/java/com/switcherapi/client/model/Entry.java
+++ b/src/main/java/com/switcherapi/client/model/Entry.java
@@ -11,27 +11,29 @@ public class Entry {
private final String strategy;
private final String input;
-
- private Entry(final String strategy, final String input) {
+
+ public Entry(String strategy, String input) {
this.strategy = strategy;
this.input = input;
}
-
- private Entry(final StrategyValidator strategy, final String input) {
+
+ public Entry(StrategyValidator strategy, String input) {
this(strategy.toString(), input);
}
/**
+ * Creates a new Entry with the given strategy and input.
+ *
* @param strategy Validator used to evaluate the Switcher
* @param input follow the required format documented into each strategy type
* @return new Entry
* @see StrategyValidator
*/
- public static Entry build(final StrategyValidator strategy, final String input) {
+ public static Entry of(StrategyValidator strategy, String input) {
return new Entry(strategy, input);
}
-
- public static Entry build(final String strategy, final String input) {
+
+ public static Entry of(String strategy, String input) {
return new Entry(strategy, input);
}
diff --git a/src/main/java/com/switcherapi/client/model/SwitcherBuilder.java b/src/main/java/com/switcherapi/client/model/SwitcherBuilder.java
index 7dd36ba..a7d393c 100644
--- a/src/main/java/com/switcherapi/client/model/SwitcherBuilder.java
+++ b/src/main/java/com/switcherapi/client/model/SwitcherBuilder.java
@@ -95,7 +95,7 @@ public SwitcherBuilder restrictRelay(boolean restrictRelay) {
*/
public SwitcherBuilder check(StrategyValidator strategy, String input) {
if (StringUtils.isNotBlank(input)) {
- entry.add(Entry.build(strategy, input));
+ entry.add(Entry.of(strategy, input));
}
return this;
diff --git a/src/main/resources/META-INF/native-image/com.switcherapi/switcher-client/reflect-config.json b/src/main/resources/META-INF/native-image/com.switcherapi/switcher-client/reflect-config.json
index 700b356..a66c838 100644
--- a/src/main/resources/META-INF/native-image/com.switcherapi/switcher-client/reflect-config.json
+++ b/src/main/resources/META-INF/native-image/com.switcherapi/switcher-client/reflect-config.json
@@ -8,7 +8,10 @@
"methods": [
{
"name": "",
- "parameterTypes": []
+ "parameterTypes": [
+ "java.lang.String",
+ "java.lang.String"
+ ]
}
]
},
@@ -21,7 +24,9 @@
"methods": [
{
"name": "",
- "parameterTypes": []
+ "parameterTypes": [
+ "com.switcherapi.client.model.Entry[]"
+ ]
}
]
},
@@ -34,7 +39,14 @@
"methods": [
{
"name": "",
- "parameterTypes": []
+ "parameterTypes": [
+ "java.lang.String",
+ "java.lang.String",
+ "boolean",
+ "com.switcherapi.client.model.criteria.StrategyConfig[]",
+ "java.lang.String[]",
+ "com.switcherapi.client.model.criteria.Relay"
+ ]
}
]
},
@@ -73,7 +85,12 @@
"methods": [
{
"name": "",
- "parameterTypes": []
+ "parameterTypes": [
+ "java.lang.String",
+ "java.lang.String",
+ "boolean",
+ "com.switcherapi.client.model.criteria.Config[]"
+ ]
}
]
},
@@ -99,7 +116,29 @@
"methods": [
{
"name": "",
- "parameterTypes": []
+ "parameterTypes": [
+ "java.lang.String",
+ "java.lang.String",
+ "java.lang.String",
+ "boolean",
+ "java.lang.String[]"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "com.switcherapi.client.model.criteria.Relay",
+ "condition": {
+ "typeReachable": "com.switcherapi.client.model.criteria.Snapshot"
+ },
+ "allDeclaredFields": true,
+ "methods": [
+ {
+ "name": "",
+ "parameterTypes": [
+ "java.lang.String",
+ "boolean"
+ ]
}
]
},
diff --git a/src/test/java/com/switcherapi/client/SwitcherLocal1Test.java b/src/test/java/com/switcherapi/client/SwitcherLocal1Test.java
index a9b5d8e..9c5f184 100644
--- a/src/test/java/com/switcherapi/client/SwitcherLocal1Test.java
+++ b/src/test/java/com/switcherapi/client/SwitcherLocal1Test.java
@@ -115,7 +115,7 @@ static Stream dateTestArguments() {
@MethodSource("dateTestArguments")
void localShouldTest_dateValidation(String useCaseKey, String input, boolean expected) {
SwitcherRequest switcher = Switchers.getSwitcher(useCaseKey);
- Entry entry = Entry.build(StrategyValidator.DATE, input);
+ Entry entry = Entry.of(StrategyValidator.DATE, input);
assertEquals(expected, switcher.prepareEntry(entry).isItOn());
}
@@ -130,7 +130,7 @@ void localShouldTestChained_dateValidation(String useCaseKey, String input, bool
@Test
void localShouldReturnFalse_dateValidationWrongFormat() {
SwitcherRequest switcher = Switchers.getSwitcher(Switchers.USECASE33);
- Entry input = Entry.build(StrategyValidator.DATE, "2019/121/13");
+ Entry input = Entry.of(StrategyValidator.DATE, "2019/121/13");
switcher.prepareEntry(input);
assertThrows(SwitcherInvalidTimeFormat.class, switcher::isItOn);
@@ -157,7 +157,7 @@ static Stream valueTestArguments() {
@MethodSource("valueTestArguments")
void localShouldTest_valueValidation(String useCaseKey, String input, boolean expected) {
SwitcherRequest switcher = Switchers.getSwitcher(useCaseKey);
- Entry entry = Entry.build(StrategyValidator.VALUE, input);
+ Entry entry = Entry.of(StrategyValidator.VALUE, input);
switcher.prepareEntry(entry);
assertEquals(expected, switcher.isItOn());
@@ -198,7 +198,7 @@ static Stream numericTestArguments() {
@MethodSource("numericTestArguments")
void localShouldTest_numericValidation(String useCaseKey, String input, boolean expected) {
SwitcherRequest switcher = Switchers.getSwitcher(useCaseKey);
- Entry entry = Entry.build(StrategyValidator.NUMERIC, input);
+ Entry entry = Entry.of(StrategyValidator.NUMERIC, input);
switcher.prepareEntry(entry);
assertEquals(expected, switcher.isItOn());
@@ -215,7 +215,7 @@ void localShouldTestChained_numericValidation(String useCaseKey, String input, b
@Test
void localShouldReturnException_invalidNumericInput() {
SwitcherRequest switcher = Switchers.getSwitcher(Switchers.USECASE81);
- Entry input = Entry.build(StrategyValidator.NUMERIC, "INVALID_NUMBER");
+ Entry input = Entry.of(StrategyValidator.NUMERIC, "INVALID_NUMBER");
switcher.prepareEntry(input);
assertThrows(SwitcherInvalidNumericFormat.class, switcher::isItOn);
@@ -239,7 +239,7 @@ static Stream timeTestArguments() {
@MethodSource("timeTestArguments")
void localShouldTest_timeValidation(String useCaseKey, String input, boolean expected) {
SwitcherRequest switcher = Switchers.getSwitcher(useCaseKey);
- Entry entry = Entry.build(StrategyValidator.TIME, input);
+ Entry entry = Entry.of(StrategyValidator.TIME, input);
switcher.prepareEntry(entry);
assertEquals(expected, switcher.isItOn());
@@ -255,7 +255,7 @@ void localShouldTestChained_timeValidation(String useCaseKey, String input, bool
@Test
void localShouldReturnFalse_timeValidationWrongFormat() {
SwitcherRequest switcher = Switchers.getSwitcher(Switchers.USECASE53);
- Entry input = Entry.build(StrategyValidator.TIME, "2019-12-10");
+ Entry input = Entry.of(StrategyValidator.TIME, "2019-12-10");
switcher.prepareEntry(input);
assertThrows(SwitcherInvalidTimeFormat.class, switcher::isItOn);
@@ -279,7 +279,7 @@ static Stream networkTestArguments() {
@MethodSource("networkTestArguments")
void localShouldTest_networkValidation(String useCaseKey, String input, boolean expected) {
SwitcherRequest switcher = Switchers.getSwitcher(useCaseKey);
- Entry entry = Entry.build(StrategyValidator.NETWORK, input);
+ Entry entry = Entry.of(StrategyValidator.NETWORK, input);
switcher.prepareEntry(entry);
assertEquals(expected, switcher.isItOn());
@@ -301,7 +301,7 @@ void localShouldReturnFalse_strategyRequiresInput() {
@Test
void localShouldReturnFalse_invalidStrategyInput() {
SwitcherRequest switcher = Switchers.getSwitcher(Switchers.USECASE33);
- switcher.prepareEntry(Entry.build(StrategyValidator.INVALID, "Value"));
+ switcher.prepareEntry(Entry.of(StrategyValidator.INVALID, "Value"));
assertFalse(switcher.isItOn());
}
@@ -328,7 +328,7 @@ static Stream regexTestArguments() {
@MethodSource("regexTestArguments")
void localShouldTest_regexValidation(String useCaseKey, String input, boolean expected) {
SwitcherRequest switcher = Switchers.getSwitcher(useCaseKey);
- Entry entry = Entry.build(StrategyValidator.REGEX, input);
+ Entry entry = Entry.of(StrategyValidator.REGEX, input);
switcher.prepareEntry(entry);
assertEquals(expected, switcher.isItOn());
@@ -357,7 +357,7 @@ static Stream payloadTestArguments() {
@MethodSource("payloadTestArguments")
void localShouldTest_payloadValidation(String useCaseKey, String input, boolean expected) {
SwitcherRequest switcher = Switchers.getSwitcher(useCaseKey);
- Entry entry = Entry.build(StrategyValidator.PAYLOAD, input);
+ Entry entry = Entry.of(StrategyValidator.PAYLOAD, input);
switcher.prepareEntry(entry);
assertEquals(expected, switcher.isItOn());
diff --git a/src/test/java/com/switcherapi/client/SwitcherLocal3Test.java b/src/test/java/com/switcherapi/client/SwitcherLocal3Test.java
index a0c2bd5..52a23a1 100644
--- a/src/test/java/com/switcherapi/client/SwitcherLocal3Test.java
+++ b/src/test/java/com/switcherapi/client/SwitcherLocal3Test.java
@@ -79,7 +79,7 @@ static Stream failTestArguments() {
void localShouldReturnError(String useCaseKey, String strategyValidator,
String input, Class error) {
SwitcherRequest switcher = Switchers.getSwitcher(useCaseKey);
- switcher.prepareEntry(Entry.build(strategyValidator, input));
+ switcher.prepareEntry(Entry.of(strategyValidator, input));
assertThrows(error, switcher::isItOn);
}
diff --git a/src/test/java/com/switcherapi/client/model/ModelTest.java b/src/test/java/com/switcherapi/client/model/ModelTest.java
index 923a0e3..01ac7de 100644
--- a/src/test/java/com/switcherapi/client/model/ModelTest.java
+++ b/src/test/java/com/switcherapi/client/model/ModelTest.java
@@ -9,8 +9,8 @@ class ModelTest {
@Test
void testModelEntry() {
- Entry entry1 = Entry.build(StrategyValidator.DATE, "2019-12-10");
- Entry entry2 = Entry.build(StrategyValidator.VALUE, "Value");
+ Entry entry1 = Entry.of(StrategyValidator.DATE, "2019-12-10");
+ Entry entry2 = Entry.of(StrategyValidator.VALUE, "Value");
assertNotEquals(true, entry1.equals(entry2));
assertNotNull(entry1.toString());
diff --git a/src/test/java/metainf/nativeimage/NativeReflectConfigTest.java b/src/test/java/metainf/nativeimage/NativeReflectConfigTest.java
index d1b3e9a..dd7d2cf 100644
--- a/src/test/java/metainf/nativeimage/NativeReflectConfigTest.java
+++ b/src/test/java/metainf/nativeimage/NativeReflectConfigTest.java
@@ -4,6 +4,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
+import java.lang.reflect.Array;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Objects;
@@ -38,8 +39,7 @@ void shouldApplyReflection() {
ReflectJson[] reflectJson = new Gson().fromJson(reflectContent, ReflectJson[].class);
for (ReflectJson json : reflectJson) {
- assertDoesNotThrow(() -> Class.forName(json.name),
- String.format("Class %s not reachable", json.name));
+ assertConstructorsReachable(json);
if (Objects.nonNull(json.condition)) {
assertDoesNotThrow(() -> Class.forName(json.condition.typeReachable),
@@ -48,12 +48,65 @@ void shouldApplyReflection() {
}
}
+ private void assertConstructorsReachable(ReflectJson json) {
+ if (Objects.nonNull(json.methods)) {
+ for (ReflectMethod method : json.methods) {
+ if ("".equals(method.name)) {
+ assertDoesNotThrow(() -> Class.forName(json.name).getDeclaredConstructor(getArgClasses(method.parameterTypes)),
+ String.format("Constructor (%s) not reachable in class %s",
+ String.join(", ", method.parameterTypes), json.name));
+ }
+ }
+ }
+ }
+
+ private Class>[] getArgClasses(String[] parameterTypes) throws ClassNotFoundException {
+ if (parameterTypes == null || parameterTypes.length == 0) {
+ return new Class>[0];
+ }
+
+ Class>[] classes = new Class>[parameterTypes.length];
+ for (int i = 0; i < parameterTypes.length; i++) {
+ String paramType = parameterTypes[i];
+ if (paramType.endsWith("[]")) {
+ String baseType = paramType.substring(0, paramType.length() - 2);
+ Class> baseClass = getPrimitiveOrClass(baseType);
+ classes[i] = Array.newInstance(baseClass, 0).getClass();
+ } else {
+ classes[i] = getPrimitiveOrClass(paramType);
+ }
+ }
+
+ return classes;
+ }
+
+ private Class> getPrimitiveOrClass(String typeName) throws ClassNotFoundException {
+ switch (typeName) {
+ case "boolean": return boolean.class;
+ case "byte": return byte.class;
+ case "char": return char.class;
+ case "short": return short.class;
+ case "int": return int.class;
+ case "long": return long.class;
+ case "float": return float.class;
+ case "double": return double.class;
+ case "void": return void.class;
+ default: return Class.forName(typeName);
+ }
+ }
+
static class ReflectJson {
String name;
ReflectCondition condition;
+ ReflectMethod[] methods;
}
static class ReflectCondition {
String typeReachable;
}
+
+ static class ReflectMethod {
+ String name;
+ String[] parameterTypes;
+ }
}
From d481dc1f41c2482545a0ddf6b6620b3ba7e05f2a Mon Sep 17 00:00:00 2001
From: petruki <31597636+petruki@users.noreply.github.com>
Date: Thu, 14 Aug 2025 21:16:07 -0700
Subject: [PATCH 2/7] test: increased shouldStartAndKillWorker delay
---
.../com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java b/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java
index 011afb3..3fed5fd 100644
--- a/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java
+++ b/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java
@@ -25,7 +25,7 @@ void shouldStartAndKillWorker() {
assertWorker(true);
SwitchersBase.stopWatchingSnapshot();
- CountDownHelper.wait(2);
+ CountDownHelper.wait(5);
assertWorker(false);
}
From 612c4b6f1982dc037d0d2a865db6ded4b3eb2b6f Mon Sep 17 00:00:00 2001
From: petruki <31597636+petruki@users.noreply.github.com>
Date: Thu, 14 Aug 2025 21:36:20 -0700
Subject: [PATCH 3/7] test: increased shouldStartAndKillWorker delay
---
.../com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java b/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java
index 3fed5fd..95ffd75 100644
--- a/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java
+++ b/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java
@@ -25,7 +25,7 @@ void shouldStartAndKillWorker() {
assertWorker(true);
SwitchersBase.stopWatchingSnapshot();
- CountDownHelper.wait(5);
+ CountDownHelper.wait(10);
assertWorker(false);
}
From dbfc9e8de0eff64f7932420fbe5ae4777a680756 Mon Sep 17 00:00:00 2001
From: petruki <31597636+petruki@users.noreply.github.com>
Date: Thu, 14 Aug 2025 21:49:30 -0700
Subject: [PATCH 4/7] test-ci: update maven cache
---
.github/workflows/master-2.yml | 3 ++-
.github/workflows/master.yml | 3 ++-
.../switcherapi/client/utils/SnapshotWatcherWorkerTest.java | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/master-2.yml b/.github/workflows/master-2.yml
index b94ab7f..7365855 100644
--- a/.github/workflows/master-2.yml
+++ b/.github/workflows/master-2.yml
@@ -46,6 +46,7 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
+ cache: maven
- name: Show Versions
run: mvn -version
@@ -58,4 +59,4 @@ jobs:
restore-keys: ${{ runner.os }}-m2-
- name: Build/Test
- run: mvn -B clean package
+ run: mvn -B clean verify
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index c8000c7..5df3163 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -46,6 +46,7 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
+ cache: maven
- name: Show Versions
run: mvn -version
@@ -58,4 +59,4 @@ jobs:
restore-keys: ${{ runner.os }}-m2-
- name: Build/Test
- run: mvn -B clean package
+ run: mvn -B clean verify
diff --git a/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java b/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java
index 95ffd75..011afb3 100644
--- a/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java
+++ b/src/test/java/com/switcherapi/client/utils/SnapshotWatcherWorkerTest.java
@@ -25,7 +25,7 @@ void shouldStartAndKillWorker() {
assertWorker(true);
SwitchersBase.stopWatchingSnapshot();
- CountDownHelper.wait(10);
+ CountDownHelper.wait(2);
assertWorker(false);
}
From 09fb4763e95cdd0a862a95ba2fd72ccee821ca99 Mon Sep 17 00:00:00 2001
From: petruki <31597636+petruki@users.noreply.github.com>
Date: Thu, 14 Aug 2025 21:53:08 -0700
Subject: [PATCH 5/7] test-ci: add coverage phase for matrix
---
.github/workflows/master-2.yml | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/.github/workflows/master-2.yml b/.github/workflows/master-2.yml
index 7365855..a837a4d 100644
--- a/.github/workflows/master-2.yml
+++ b/.github/workflows/master-2.yml
@@ -51,12 +51,5 @@ jobs:
- name: Show Versions
run: mvn -version
- - name: Cache Maven packages
- uses: actions/cache@v4
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ matrix.java }}
- restore-keys: ${{ runner.os }}-m2-
-
- name: Build/Test
- run: mvn -B clean verify
+ run: mvn -B clean verify -Pcoverage
From a8e05ac5df0cc20e88a22d5f8f58785713d79cf7 Mon Sep 17 00:00:00 2001
From: petruki <31597636+petruki@users.noreply.github.com>
Date: Thu, 14 Aug 2025 21:57:15 -0700
Subject: [PATCH 6/7] test-ci: updated matrix to use ubuntu-22.04
---
.github/workflows/master-2.yml | 12 +++++++++---
.github/workflows/master.yml | 5 ++---
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/master-2.yml b/.github/workflows/master-2.yml
index a837a4d..f3ea0f7 100644
--- a/.github/workflows/master-2.yml
+++ b/.github/workflows/master-2.yml
@@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
java: ['11', '17', '21']
- os: [ubuntu-latest, windows-latest]
+ os: [ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
@@ -46,10 +46,16 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- cache: maven
- name: Show Versions
run: mvn -version
+ - name: Cache Maven packages
+ uses: actions/cache@v4
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-m2-${{ matrix.java }}
+ restore-keys: ${{ runner.os }}-m2-
+
- name: Build/Test
- run: mvn -B clean verify -Pcoverage
+ run: mvn -B clean package
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index 5df3163..d8950b5 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
java: ['8', '11', '17', '21']
- os: [ubuntu-latest, windows-latest]
+ os: [ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
@@ -46,7 +46,6 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- cache: maven
- name: Show Versions
run: mvn -version
@@ -59,4 +58,4 @@ jobs:
restore-keys: ${{ runner.os }}-m2-
- name: Build/Test
- run: mvn -B clean verify
+ run: mvn -B clean package
From e5caac17e4c836b180daee0d81b4a5626616201c Mon Sep 17 00:00:00 2001
From: petruki <31597636+petruki@users.noreply.github.com>
Date: Thu, 14 Aug 2025 21:59:33 -0700
Subject: [PATCH 7/7] test-ci: updated all matrices to use ubuntu-22.04
---
.github/workflows/master-2.yml | 2 +-
.github/workflows/master.yml | 2 +-
.github/workflows/release.yml | 4 ++--
.github/workflows/sonar.yml | 2 +-
.github/workflows/staging.yml | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/master-2.yml b/.github/workflows/master-2.yml
index f3ea0f7..1f64f7f 100644
--- a/.github/workflows/master-2.yml
+++ b/.github/workflows/master-2.yml
@@ -9,7 +9,7 @@ on:
jobs:
build-scan:
name: SonarCloud Scan
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index d8950b5..1e282a1 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -9,7 +9,7 @@ on:
jobs:
build-scan:
name: SonarCloud Scan
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 0ee87e7..f0dc27d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -11,7 +11,7 @@ jobs:
fail-fast: false
matrix:
java: ['11', '17', '21']
- os: [ubuntu-latest, windows-latest]
+ os: [ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.os }}
steps:
@@ -39,7 +39,7 @@ jobs:
publish:
name: Publish Release
needs: [build-test]
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml
index db54d6e..2f67530 100644
--- a/.github/workflows/sonar.yml
+++ b/.github/workflows/sonar.yml
@@ -11,7 +11,7 @@ on:
jobs:
sonar-analysis:
name: SonarCloud Analysis for PR
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
steps:
- name: Get PR details
diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml
index 9e8bccf..a48d1fd 100644
--- a/.github/workflows/staging.yml
+++ b/.github/workflows/staging.yml
@@ -9,7 +9,7 @@ on:
required: true
default: '17'
os:
- description: 'Operating System (ubuntu-20.04, ubuntu-latest, windows-latest)'
+ description: 'Operating System (ubuntu-22.04, ubuntu-latest, windows-latest)'
required: true
default: 'ubuntu-latest'