Skip to content

test: introduce pytest-docker #602

test: introduce pytest-docker

test: introduce pytest-docker #602

Workflow file for this run

name: Python CI
on: ["pull_request", "push"]
jobs:
test:
runs-on: ubuntu-latest
services:
redis:
image: "redis/redis-stack:6.2.6-v7"
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
python-version: ["3.11"]
poetry-version: ["1.6.1"]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get -yqq install build-essential
- name: Setup poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install Python dependencies
env:
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
run: poetry install
- name: Run tests
env:
REDIS_OM_URL: redis://localhost:6379
REDIS_CACHE_URL: redis://localhost:6379
ARQ_REDIS_URL: redis://localhost:6379
run: poetry run pytest