Adds cloud Redis agent memory option #57
Workflow file for this run
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: '0 8 * * 1' # Weekly on Monday — proactively catches new NAT releases | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Sync | |
| run: uv sync --group dev --extra test | |
| - name: Ruff lint | |
| run: uv run ruff check . | |
| - name: Ruff format | |
| run: uv run ruff format --check . | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| services: | |
| redis: | |
| image: redis/redis-stack:7.4.0-v3 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Sync | |
| run: uv sync --group dev --extra test | |
| - name: Pytest | |
| run: uv run python -m pytest | |
| validate-examples: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Sync | |
| run: uv sync --group dev --extra test | |
| - name: Validate tool-based-memory config | |
| run: uv run nat validate --config_file examples/tool_based_memory/configs/config.yml | |
| - name: Validate agent-auto-memory config | |
| run: uv run nat validate --config_file examples/agent_auto_memory/configs/config.yml | |
| - name: Check tool-based runner CLI | |
| run: uv run python examples/tool_based_memory/run_agent.py --help | |
| - name: Check native-wrapper runner CLI | |
| run: uv run python examples/agent_auto_memory/run_agent.py --help | |
| integration: | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis/redis-stack:7.4.0-v3 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Sync | |
| run: uv sync --group dev --extra test | |
| - name: Docker Info | |
| run: docker info | |
| - name: Integration Tests | |
| env: | |
| AGENT_MEMORY_ENDPOINT: ${{ secrets.AGENT_MEMORY_ENDPOINT }} | |
| AGENT_MEMORY_API_KEY: ${{ secrets.AGENT_MEMORY_API_KEY }} | |
| AGENT_MEMORY_STORE_ID: ${{ secrets.AGENT_MEMORY_STORE_ID }} | |
| run: uv run python -m pytest tests/integration --run-integration | |
| integration-api: | |
| runs-on: ubuntu-latest | |
| env: | |
| NAT_OPENAI_MODEL: ${{ vars.NAT_OPENAI_MODEL || 'gpt-4o-mini' }} | |
| services: | |
| redis: | |
| image: redis/redis-stack:7.4.0-v3 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Sync | |
| run: uv sync --group dev --extra test | |
| - name: OpenAI-Backed Integration Tests | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| run: | | |
| if [ -z "$OPENAI_API_KEY" ]; then | |
| echo "OPENAI_API_KEY is not configured; skipping API-backed integration tests." | |
| exit 0 | |
| fi | |
| docker info | |
| uv run python -m pytest tests/integration --run-integration --run-api-tests | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # required for setuptools-scm to resolve version from git tags | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Build | |
| run: uv build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/* | |
| compat: | |
| name: NAT compatibility (${{ matrix.nat-core }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| nat-core: ["~=1.6.0", "~=1.7.0"] | |
| services: | |
| redis: | |
| image: redis/redis-stack:7.4.0-v3 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Sync | |
| run: uv sync --group dev --extra test | |
| - name: Pin nvidia-nat-core version | |
| run: uv pip install "nvidia-nat-core${{ matrix.nat-core }}" | |
| - name: Validate tool-based-memory config | |
| run: uv run nat validate --config_file examples/tool_based_memory/configs/config.yml | |
| - name: Validate agent-auto-memory config | |
| run: uv run nat validate --config_file examples/agent_auto_memory/configs/config.yml | |
| - name: Run tests | |
| run: uv run python -m pytest |