Skip to content

Commit 3af2455

Browse files
Add github tests ci
1 parent cf1b41b commit 3af2455

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @splitio/sdk

.github/workflows/test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
test:
14+
name: Run tests
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
jdk:
20+
- '8'
21+
- '11'
22+
- '19'
23+
env:
24+
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
25+
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
26+
MAVEN_OPTS: "-XX:InitialHeapSize=2G -XX:MaxHeapSize=2G -XX:+PrintCommandLineFlags -XX:ThreadStackSize=65536 -XX:-TieredCompilation -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
27+
muteProps: "true"
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v5
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Setup JDK ${{ matrix.jdk }}
36+
uses: actions/setup-java@v3
37+
with:
38+
distribution: 'adopt'
39+
java-version: ${{ matrix.jdk }}
40+
41+
- name: Setup Maven
42+
run: cp .ci.settings.xml ${HOME}/.m2/settings.xml
43+
44+
- name: Test
45+
if: matrix.jdk == '8' && github.event_name == 'pull_request' && github.ref != 'refs/heads/main' && github.ref != 'refs/heads/development'
46+
run: mvn --batch-mode clean install

src/main/java/io/split/openfeature/SplitProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private <T> ProviderEvaluation<T> getEvaluation(
113113
String treatment = evaluated.treatment();
114114
String config = evaluated.config();
115115
ImmutableMetadata metadata = ImmutableMetadata.builder().addString("config", config).build();
116-
System.out.println(metadata.getString("config"));
116+
117117
if (noTreatment(treatment)) {
118118
return constructProviderEvaluation(
119119
defaultValue, treatment, Reason.DEFAULT, ErrorCode.FLAG_NOT_FOUND, metadata);

0 commit comments

Comments
 (0)