Update test.yml

This commit is contained in:
Daniel Grams 2021-01-26 19:51:19 +01:00
parent 4e7d2b64da
commit f002eaefd9

View File

@ -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