Skip to content

Cache table & database #187

Cache table & database

Cache table & database #187

Workflow file for this run

# Python integration tests
name: Python-Integration
on:
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
jobs:
tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.9, '3.10', 3.11]
env:
PYTHONPATH: ${{ github.workspace }}
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: commcarehq
POSTGRES_PASSWORD: commcarehq
POSTGRES_DB: test_superset_hq
ports:
# Use custom ports for services to avoid accidentally connecting to
# GitHub action runner's default installations
- 5432:5432
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
ports:
- 6379:6379
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v2
with:
persist-credentials: false
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir -r requirements_test.txt
- name: Create shared_dir
run: |
mkdir shared_dir
- name: Run Tests
run: |
pytest -W ignore::DeprecationWarning