Skip to content

Merge pull request #25 from aerospike-community/recipe/infinite-chat-… #85

Merge pull request #25 from aerospike-community/recipe/infinite-chat-…

Merge pull request #25 from aerospike-community/recipe/infinite-chat-… #85

Workflow file for this run

# Unit tests: no Docker. Integration tests: explicit Aerospike CE container
# (scripts/start_aerospike_ce.sh) then pytest with AEROSPIKE_TEST_* env vars.
name: Tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit:
name: Unit tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: python -m pip install --upgrade pip && pip install -e ".[dev]"
- name: Run unit tests
run: pytest -m "not aerospike" -v --tb=short
integration:
name: Integration tests (Aerospike CE)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: python -m pip install --upgrade pip && pip install -e ".[dev]"
- name: Start Aerospike CE (Docker)
run: |
chmod +x scripts/start_aerospike_ce.sh scripts/stop_aerospike_ce.sh
./scripts/start_aerospike_ce.sh
docker ps --filter "name=adk-aerospike-ci"
cat .aerospike-ci.env
- name: Run integration tests
run: |
set -a
source .aerospike-ci.env
set +a
pytest -m aerospike -v --tb=short
- name: Stop Aerospike CE
if: always()
run: ./scripts/stop_aerospike_ce.sh