Skip to content
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
src/test/resources/shared
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

putting the shared test files in the same place the shared common repository does for consistency and to make it easier to reuse testing tools

.gradle
build/
target/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
Expand Down Expand Up @@ -41,5 +43,3 @@ bin/
### Mac OS ###
.DS_Store
.idea/
src/test/resources/assignment-v2/
src/test/resources/rac-experiments-v3.json
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,20 @@ build: test-data
./gradlew assemble

## test-data
testDataDir := src/test/resources
banditsDataDir := ${testDataDir}/bandits
testDataDir := src/test/resources/shared
tempDir := ${testDataDir}/temp
tempBanditsDir := ${tempDir}/bandits
gitDataDir := ${tempDir}/sdk-test-data
branchName := main
githubRepoLink := https://github.com/Eppo-exp/sdk-test-data.git
.PHONY: test-data
test-data:
find ${testDataDir} -mindepth 1 ! -regex '^${banditsDataDir}.*' -delete
rm -rf $(testDataDir)
mkdir -p ${tempDir}
git clone -b ${branchName} --depth 1 --single-branch ${githubRepoLink} ${gitDataDir}
cp ${gitDataDir}/rac-experiments-v3.json ${testDataDir}
cp -r ${gitDataDir}/assignment-v2 ${testDataDir}
cp -r ${gitDataDir}/ufc ${testDataDir}
rm ${testDataDir}/ufc/bandit-tests/*.dynamic-typing.json
rm -rf ${tempDir}

.PHONY: test
test: test-data build
./gradlew check
./gradlew check --no-daemon
14 changes: 11 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group = 'cloud.eppo'
version = '2.5.0-SNAPSHOT'
version = '3.0.0-SNAPSHOT'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰

ext.isReleaseVersion = !version.endsWith("SNAPSHOT")

import org.apache.tools.ant.filters.ReplaceTokens
Expand All @@ -25,7 +25,7 @@ repositories {
}

dependencies {
implementation 'cloud.eppo:sdk-common-jvm:2.0.0-SNAPSHOT'
implementation 'cloud.eppo:sdk-common-jvm:3.0.1-SNAPSHOT'
implementation 'com.github.zafarkhaja:java-semver:0.10.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.1'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
Expand All @@ -34,15 +34,23 @@ dependencies {
// Logback classic 1.3.x is compatible with java 8
implementation 'ch.qos.logback:logback-classic:1.3.14'

testImplementation 'org.projectlombok:lombok:1.18.24'
testImplementation 'cloud.eppo:sdk-common-jvm:3.0.0-SNAPSHOT:tests'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting, didn't know about this syntax

testImplementation platform('org.junit:junit-bom:5.10.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'com.github.tomakehurst:wiremock-jre8:2.35.2'
testImplementation 'org.mockito:mockito-core:4.11.0'
testImplementation 'com.squareup.okhttp3:okhttp:4.9.1'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to mock stuff regarding Reponse

}

test {
useJUnitPlatform()
testLogging {
events "started", "passed", "skipped", "failed"
exceptionFormat "full"
showExceptions true
showCauses true
showStackTraces true
}
}

spotless {
Expand Down
Loading