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