diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..fe13275 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: '16' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn verify -Dit=true diff --git a/README.md b/README.md index bea24f2..adcd315 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,15 @@ # spring-boot-tests ## Run Tests ``` -mvn verify -Ddocker_host=localhost +mvn verify -Dit=true + +# Docker Daemon host can be customized with: -Ddocker_host=unix:///var/run/docker.sock ``` ## Start/Stop containers for IDE tests running ``` -mvn docker:start -Ddocker_host=localhost -mvn docker:stop -Ddocker_host=localhost +mvn docker:start -Dit=true +mvn docker:stop -Dit=true + +# Docker Daemon host can be customized with: -Ddocker_host=unix:///var/run/docker.sock ``` diff --git a/pom.xml b/pom.xml index 7c2b001..a65984c 100644 --- a/pom.xml +++ b/pom.xml @@ -91,13 +91,14 @@ it - docker_host + it + true 2375 + 0.0.0.0 5432 - @@ -114,7 +115,7 @@ tests-remote - ${docker_host} + ${postgres_host} ${postgres_port} @@ -141,7 +142,7 @@ - tcp://${docker_host}:${docker_port} + ${docker_host} postgres:11