Skip to content

Memory storage

Memory storage #55

Workflow file for this run

name: Test
on:
push:
branches: [ dev, main ]
pull_request:
branches: [ dev, main ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
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'}}

Check failure on line 21 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / Test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 21, Col: 9): Unexpected value 'if'
# 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
ports:
# Maps port 6379 on service container to the host
- 6379:6379
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pytest
python3 -m pip install pytest-cov
python3 -m pip install -e .[tests,gym,memory_storage]
- name: Tests
run: |
pytest --cov=cst_python --cov-report json
shell: bash
- if: ${{matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'}}
name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage_report
path: coverage.json
coverage-check:
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v2
- name: Retrieve coverage report
uses: actions/download-artifact@v4
with:
name: coverage_report
- name: Coverage Check
run: |
python3 tests/check_coverage.py