Repository navigation
fix(api): accept empty-string dialog.url and party tel at ingest (#206) #578
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python conserver unit test | |
| on: | |
| push: | |
| branches: [ main ] # only run on pushes to main branch | |
| pull_request: # all PRs | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Check out the repository | |
| - name: Check out the repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Docker | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y docker-compose | |
| - name: Create .env file | |
| run: | | |
| echo "REDIS_URL=redis://redis" >> .env | |
| echo "CONSERVER_API_TOKEN=fake-token" >> .env | |
| - name: We need to create Conserver network for now | |
| run: | | |
| docker network create conserver | |
| - name: Build and run services with Docker Compose | |
| run: | | |
| docker-compose up --build --detach | |
| - name: Require ordinary Redis storage integration tests | |
| run: | | |
| docker-compose run --rm conserver pytest -q tests/core/test_plain_redis.py tests/core/test_redis_json_migration.py tests/core/test_vcon_redis_ttl.py common/tests/test_api.py | |
| - name: Rehearse legacy RedisJSON migration | |
| run: | | |
| docker run -d --name redisjson-migration-source --network conserver --health-cmd 'redis-cli ping' --health-interval 1s --health-retries 30 redis/redis-stack@sha256:5d5154123426693540ea6c1d9e638eae2bf2024879c839db6fcfdd7717e817c7 | |
| for i in $(seq 1 30); do | |
| if docker exec redisjson-migration-source redis-cli ping; then break; fi | |
| sleep 1 | |
| done | |
| docker-compose run --rm -e REDISJSON_TEST_SOURCE_URL=redis://redisjson-migration-source:6379/15 -e REDISJSON_TEST_TARGET_URL=redis://redis:6379/15 conserver pytest -q tests/core/test_redis_json_migration.py::test_redisjson_copy_to_ordinary_redis | |
| - name: Run tests inside Docker container | |
| run: | | |
| docker-compose run --rm conserver bash -c " | |
| pytest --maxfail=5 --disable-warnings --cov --cov-report=term-missing:skip-covered --cov-report=xml --cov-report=html | |
| " | |
| - name: Upload coverage report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-report | |
| path: | | |
| coverage.xml | |
| htmlcov/ | |
| - name: Clean up | |
| if: always() | |
| run: | | |
| docker-compose down | |
| docker rm -f redisjson-migration-source || true |