From f002eaefd9d5cc503e647379e45effbd7618c4fb Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Tue, 26 Jan 2021 19:51:19 +0100 Subject: [PATCH] Update test.yml --- .github/workflows/test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 647457f..59d18e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,11 +7,9 @@ on: [push, pull_request, workflow_dispatch] jobs: # Label of the container job - container-job: + runner-job: # Containers must run in Linux based operating systems runs-on: ubuntu-latest - # Docker Hub image that `container-job` executes in - container: python:3.7-slim-buster # Service containers to run with `container-job` services: @@ -30,6 +28,9 @@ jobs: --health-interval 10s --health-timeout 5s --health-retries 5 + ports: + # Maps tcp port 5432 on service container to the host + - 5432:5432 steps: - name: Check out repository code @@ -41,10 +42,11 @@ jobs: - name: Run tests run: pytest --cov=project env: - TEST_DATABASE_URL: postgresql://postgres:postgres@postgres/gsevpt_tests + TEST_DATABASE_URL: postgresql://postgres:postgres@localhost/gsevpt_tests - name: Codecov if: ${{ success() }} uses: codecov/codecov-action@v1 with: verbose: true + fail_ci_if_error: true