From 952245e974c06bb5121fbfdd69ee0af20ce835fb Mon Sep 17 00:00:00 2001 From: Elton Cardoso do Nascimento <43186596+EltonCN@users.noreply.github.com> Date: Sun, 1 Dec 2024 17:40:34 -0300 Subject: [PATCH] Tests CI fix --- .github/workflows/test.yml | 15 ++++++++++++++- pyproject.toml | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f8939f8..3edd0ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,19 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] python-version: ["3.10", "3.11", "3.12"] + + services: + # Label used to access the service container + redis: + if: ${{matrix.os == 'ubuntu-latest'}} + # 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 + --health-retries 5 steps: - uses: actions/checkout@v2 @@ -28,7 +41,7 @@ jobs: python3 -m pip install --upgrade pip python3 -m pip install pytest python3 -m pip install pytest-cov - python3 -m pip install -e .[tests,gym] + python3 -m pip install -e .[tests,gym,memory_storage] - name: Tests run: | diff --git a/pyproject.toml b/pyproject.toml index 9f9cd96..25058cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ tests = ["mypy", "testbook", "ipython", "ipykernel", "numpy", "matplotlib", "typ doc_generation = ["sphinx", "sphinx_rtd_theme", "nbsphinx", "sphinx-mdinclude==0.5.4"] dev = ["cffconvert"] gym = ["gymnasium"] +memory_storage = ["redis"] [tool.setuptools] include-package-data = true