Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
ci: Add postgres and rabbitmq services
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Mar 28, 2021
1 parent e88a111 commit a94b41b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@ env:
jobs:
build:
runs-on: ubuntu-18.04
services:
postgres:
image: postgres:11
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432/tcp
rabbitmq:
image: rabbitmq:latest
options: >-
--health-cmd "rabbitmqctl node_health_check"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5672/tcp
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
Expand All @@ -21,6 +42,12 @@ jobs:
- run: ./manage.py --help
- run: pip install -r requirements_dev.txt
- run: coverage run --source content,country,covidadmin,vizualization manage.py test
env:
DB_NAME: postgres
DB_USER: postgres
DB_PASSWORD: postgres
DB_PORT: ${{ job.services.postgres.ports[5432] }}
CELERY_BROKER_URL: amqp://localhost:${{ job.services.rabbitmq.ports[5672] }}
if: always()
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit a94b41b

Please sign in to comment.