From a94b41ba9dd36fbb447401220db813e00ec94fdb Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Sun, 28 Mar 2021 01:14:19 -0400 Subject: [PATCH] ci: Add postgres and rabbitmq services --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 149dd23..31e52ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 }}