diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2bea20b43..10a1251707 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,15 +110,27 @@ jobs: backend: ['django', 'sqlalchemy'] python-version: [3.5, 3.8] + services: + postgres: + image: postgres:10 + env: + POSTGRES_DB: test_${{ matrix.backend }} + POSTGRES_PASSWORD: '' + POSTGRES_HOST_AUTH_METHOD: trust + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + rabbitmq: + image: rabbitmq:latest + ports: + - 5672:5672 + steps: - uses: actions/checkout@v2 - - uses: CasperWA/postgresql-action@v1.2 - with: - postgresql version: '10' - postgresql db: test_${{ matrix.backend }} - postgresql user: postgres - postgresql password: '' - postgresql auth: trust - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 @@ -127,13 +139,9 @@ jobs: - name: Install system dependencies run: | - wget -O - "https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc" | sudo apt-key add - - echo 'deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list - echo 'deb https://dl.bintray.com/rabbitmq/debian bionic main' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list sudo apt update - sudo apt install postgresql-10 rabbitmq-server graphviz - sudo systemctl status rabbitmq-server.service + sudo apt install postgresql-10 graphviz - name: Upgrade pip run: | diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index 05224f43dc..54be58f1d5 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -98,15 +98,27 @@ jobs: python-version: [3.5, 3.6, 3.7, 3.8] backend: ['django', 'sqlalchemy'] + services: + postgres: + image: postgres:10 + env: + POSTGRES_DB: test_${{ matrix.backend }} + POSTGRES_PASSWORD: '' + POSTGRES_HOST_AUTH_METHOD: trust + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + rabbitmq: + image: rabbitmq:latest + ports: + - 5672:5672 + steps: - uses: actions/checkout@v2 - - uses: CasperWA/postgresql-action@v1.2 - with: - postgresql version: '10' - postgresql db: test_${{ matrix.backend }} - postgresql user: postgres - postgresql password: '' - postgresql auth: trust - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 @@ -115,13 +127,9 @@ jobs: - name: Install system dependencies run: | - wget -O - "https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc" | sudo apt-key add - - echo 'deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list - echo 'deb https://dl.bintray.com/rabbitmq/debian bionic main' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list sudo apt update - sudo apt install postgresql-10 rabbitmq-server graphviz - sudo systemctl status rabbitmq-server.service + sudo apt install postgresql-10 graphviz - run: pip install --upgrade pip diff --git a/.github/workflows/update-requirements.yml b/.github/workflows/update-requirements.yml index 636f8c9d3d..ebc0b22a5c 100644 --- a/.github/workflows/update-requirements.yml +++ b/.github/workflows/update-requirements.yml @@ -17,17 +17,29 @@ jobs: backend: ['django', 'sqlalchemy'] python-version: [3.5, 3.6, 3.7, 3.8] + services: + postgres: + image: postgres:10 + env: + POSTGRES_DB: test_${{ matrix.backend }} + POSTGRES_PASSWORD: '' + POSTGRES_HOST_AUTH_METHOD: trust + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + rabbitmq: + image: rabbitmq:latest + ports: + - 5672:5672 + steps: - uses: actions/checkout@v2 with: ref: ${{ github.event.client_payload.head_ref }} - - uses: CasperWA/postgresql-action@v1.2 - with: - postgresql version: '10' - postgresql db: test_${{ matrix.backend }} - postgresql user: postgres - postgresql password: '' - postgresql auth: trust - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 @@ -36,13 +48,9 @@ jobs: - name: Install system dependencies run: | - wget -O - "https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc" | sudo apt-key add - - echo 'deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list - echo 'deb https://dl.bintray.com/rabbitmq/debian bionic main' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list sudo apt update - sudo apt install postgresql-10 rabbitmq-server graphviz - sudo systemctl status rabbitmq-server.service + sudo apt install postgresql-10 graphviz - run: pip install --upgrade pip