Skip to content

Commit 90d5544

Browse files
committed
Revert the following:
* Update GH workflow to ignore MongoDB startup. * Run MongoDB Docker container as part of Gradle build.
1 parent 6ea2b18 commit 90d5544

File tree

2 files changed

+5
-23
lines changed

2 files changed

+5
-23
lines changed

.github/workflows/pr.yml

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on: pull_request_target
44
jobs:
55
build:
66
runs-on: ubuntu-latest
7+
services:
8+
mongodb:
9+
image: mongo:3.2
10+
ports:
11+
- 27017:27017
712
steps:
813
- name: Checkout source code
914
uses: actions/checkout@v2

build.gradle

-23
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import com.bmuschko.gradle.docker.tasks.container.*
2-
31
plugins {
42
id "java"
53
id "scala"
64
id "application"
75
id "cz.alenkacz.gradle.scalafmt" version "1.16.2"
8-
id 'com.bmuschko.docker-remote-api' version '9.0.1'
96
}
107

118
version = '1.0.2'
@@ -27,23 +24,3 @@ dependencies {
2724
}
2825

2926
compileScala.dependsOn("checkScalafmt")
30-
31-
task createMongoContainer(type: DockerCreateContainer) {
32-
targetImageId 'mongo:3.2'
33-
containerName = 'mongo'
34-
hostConfig.portBindings = ['27017:27017']
35-
hostConfig.autoRemove = true
36-
}
37-
38-
task startMongoContainer(type: DockerStartContainer) {
39-
dependsOn createMongoContainer
40-
targetContainerId createMongoContainer.containerId
41-
}
42-
43-
task stopMongoContainer(type: DockerStopContainer) {
44-
targetContainerId createMongoContainer.containerId
45-
}
46-
47-
run.dependsOn(startMongoContainer)
48-
49-
run.finalizedBy(stopMongoContainer)

0 commit comments

Comments
 (0)