Skip to content

Commit

Permalink
Revert the following:
Browse files Browse the repository at this point in the history
* Update GH workflow to ignore MongoDB startup.
* Run MongoDB Docker container as part of Gradle build.
  • Loading branch information
marc0der committed Dec 10, 2022
1 parent 6ea2b18 commit 90d5544
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on: pull_request_target
jobs:
build:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:3.2
ports:
- 27017:27017
steps:
- name: Checkout source code
uses: actions/checkout@v2
Expand Down
23 changes: 0 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import com.bmuschko.gradle.docker.tasks.container.*

plugins {
id "java"
id "scala"
id "application"
id "cz.alenkacz.gradle.scalafmt" version "1.16.2"
id 'com.bmuschko.docker-remote-api' version '9.0.1'
}

version = '1.0.2'
Expand All @@ -27,23 +24,3 @@ dependencies {
}

compileScala.dependsOn("checkScalafmt")

task createMongoContainer(type: DockerCreateContainer) {
targetImageId 'mongo:3.2'
containerName = 'mongo'
hostConfig.portBindings = ['27017:27017']
hostConfig.autoRemove = true
}

task startMongoContainer(type: DockerStartContainer) {
dependsOn createMongoContainer
targetContainerId createMongoContainer.containerId
}

task stopMongoContainer(type: DockerStopContainer) {
targetContainerId createMongoContainer.containerId
}

run.dependsOn(startMongoContainer)

run.finalizedBy(stopMongoContainer)

0 comments on commit 90d5544

Please sign in to comment.