From f92401ff1e6dac4b16ede94ed0164d8c26254ab9 Mon Sep 17 00:00:00 2001 From: Lennart Koopmann Date: Sat, 9 May 2020 20:31:32 -0500 Subject: [PATCH] try to connect to postgresql --- .github/workflows/maven.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 90ce556e5..b878b3177 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -5,9 +5,26 @@ on: [push, pull_request] jobs: build_and_test: runs-on: ubuntu-latest + + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: postgres + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + steps: - uses: actions/checkout@v2 + - name: Create Database + run: createdb nzyme-java-tests + - name: Set up JDK 11 uses: actions/setup-java@v1 with: @@ -24,3 +41,5 @@ jobs: - name: Build and Test run: mvn -B test + env: + TEST_DATABASE_URL: postgresql://localhost:5432/nzyme-java-tests