Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate examples project to Gradle subproject #1177

Merged
merged 11 commits into from
Feb 19, 2019
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
2 changes: 1 addition & 1 deletion .dependabot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ update_configs:
update_schedule: "daily"

# Examples
- package_manager: "java:maven"
- package_manager: "java:gradle"
kiview marked this conversation as resolved.
Show resolved Hide resolved
directory: "/examples"
update_schedule: "daily"
automerged_updates:
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- env: [ NAME=modules ]
script: ./gradlew check -x testcontainers:check -x selenium:check --scan --no-daemon

- env: [ NAME=examples ]
bsideup marked this conversation as resolved.
Show resolved Hide resolved
script: cd examples && ../gradlew check --scan --no-daemon

# Run Docker-in-Docker tests inside Alpine
- env: [ NAME="docker-in-alpine-docker" ]
script:
Expand Down
13 changes: 2 additions & 11 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,18 @@ jobs:
examples:
steps:
- checkout
- restore_cache:
key: examples-maven
- run:
name: Publish JARs to Maven Local
command: ./gradlew --no-daemon publishToMavenLocal
- run:
command: mvn -B -f examples/pom.xml -Dtestcontainers.group=org.testcontainers -Dtestcontainers.version=unspecified test
command: cd examples && ../gradlew check
- run:
name: Save test results
command: |
mkdir -p ~/junit/
find examples -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \;
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \;
when: always
- store_test_results:
path: ~/junit
- store_artifacts:
path: ~/junit
- save_cache:
paths:
- ~/.m2
key: examples-maven

workflows:
version: 2
Expand Down
4 changes: 0 additions & 4 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ The code in this repository accompanies the following blog posts:
* [JUnit integration testing with Docker and Testcontainers](https://rnorth.org/junit-integration-testing-with-docker-and-testcontainers)
* [Fun with Disque, Java and Spinach](https://rnorth.org/fun-with-disque-java-and-spinach)
* [Better JUnit Selenium testing with Docker and Testcontainers](https://rnorth.org/better-junit-selenium-testing-with-docker-and-testcontainers)

Note that this examples project uses JitPack to obtain SNAPSHOT versions of the latest build of TestContainers. For
normal usage, refer to the [documentation](http://testcontainers.viewdocs.io/testcontainers-java/#user-content-maven-dependencies)
for setting the correct maven dependencies for your project.
17 changes: 17 additions & 0 deletions examples/disque-job-queue/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
plugins {
id 'java'
}

repositories {
jcenter()
}

dependencies {
compileOnly 'org.projectlombok:lombok:1.18.4'
implementation 'biz.paluch.redis:spinach:0.3'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.guava:guava:23.0'
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'org.testcontainers:testcontainers'
}
44 changes: 0 additions & 44 deletions examples/disque-job-queue/pom.xml

This file was deleted.

16 changes: 16 additions & 0 deletions examples/linked-container/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
id 'java'
}

repositories {
jcenter()
}
dependencies {
compileOnly 'org.slf4j:slf4j-api:1.7.25'
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'org.json:json:20180813'
testImplementation 'org.postgresql:postgresql:42.2.5'
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
testImplementation 'org.testcontainers:postgresql'
}

50 changes: 0 additions & 50 deletions examples/linked-container/pom.xml

This file was deleted.

87 changes: 0 additions & 87 deletions examples/pom.xml

This file was deleted.

21 changes: 21 additions & 0 deletions examples/redis-backed-cache-testng/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins {
id 'java'
}

repositories {
jcenter()
}

dependencies {
compileOnly 'org.slf4j:slf4j-api:1.7.25'
implementation 'redis.clients:jedis:3.0.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.guava:guava:23.0'
testImplementation 'org.testcontainers:testcontainers'
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
testImplementation 'org.testng:testng:6.14.3'
}

test {
useTestNG()
}
51 changes: 0 additions & 51 deletions examples/redis-backed-cache-testng/pom.xml

This file was deleted.

17 changes: 17 additions & 0 deletions examples/redis-backed-cache/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
plugins {
id 'java'
}

repositories {
jcenter()
}

dependencies {
compileOnly 'org.slf4j:slf4j-api:1.7.25'
implementation 'redis.clients:jedis:3.0.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.guava:guava:23.0'
testImplementation 'org.testcontainers:testcontainers'
testImplementation 'junit:junit:4.12'
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
}
Loading