Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci/cd init #25

Merged
merged 12 commits into from
Jul 8, 2024
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/features.conf filter=git-crypt diff=git-crypt
49 changes: 49 additions & 0 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Run Unit Tests

on:
pull_request:
branches:
- dev

jobs:
test:
runs-on: ubuntu-latest


strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]


steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Start Aerospike Server
run: |
docker run -d --network=host --name aerospike -p 3000:3000 -v .:/etc/aerospike aerospike/aerospike-server-enterprise:latest
working-directory: tests


- name: Start Aerospike Proximus
run: |
docker run -d --network=host -p 5000:5000 -v ./aerospike-proximus.yml:/etc/aerospike-proximus/aerospike-proximus.yml -v ./features.conf:/etc/aerospike-proximus/features.conf aerospike/aerospike-proximus:0.4.0
working-directory: tests


- name: Install dependencies
run: |
python -m pip install --upgrade pip
python setup.py
pip install -r requirements.txt
working-directory: tests

- name: Run unit tests
run: |
python -m pytest -s
working-directory: tests
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Python client for Aerospike Vector Search Database

## Prerequisites
- Python 3.9 or higher
- Python 3.9 or higher
- pip version 9.0.1 or higher
- Aerospike Vector Search DB and Aerospike clusters running.

Expand Down
57 changes: 57 additions & 0 deletions tests/aerospike-proximus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Change the configuration for your use case.
# TODO: Link to Proximus docs

cluster:
# Custom node-id. It will be auto-generated if not specified.
# node-id: a1

# Unique identifier for this cluster.
cluster-name: aerospike-proximus
node-id: ffffffffffffffff

# The Proximus service listening ports, TLS and network interface.
service:
ports:
5000:
addresses:
localhost
# Required when running behind NAT
#advertised-listeners:
# default:
# # List of externally accessible addresses and ports for this Proximus instance.
# - address: 10.0.0.1
# port: 5000


# Management API listening ports, TLS and network interface.
manage:
ports:
5040: { }

# Intra cluster interconnect listening ports, TLS and network interface.
interconnect:
ports:
5001:
addresses:
localhost

#heartbeat:
# seeds:
# - address: localhost
# port: 6001

# Target Aerospike cluster
aerospike:
seeds:
- localhost:
port: 3000

# The logging properties.
logging:
#format: json
#file: /var/log/aerospike-proximus/aerospike-proximus.log
enable-console-logging: true
levels:
com.aerospike.vector.index.cache.IndexCacheCoordinator: debug
# metrics-ticker: info
# root: debug
71 changes: 71 additions & 0 deletions tests/aerospike.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

# Aerospike database configuration file
# This template sets up a single-node, single namespace developer environment.
#
# Alternatively, you can pass in your own configuration file.
# You can see more examples at
# https://github.com/aerospike/aerospike-server/tree/master/as/etc

# This stanza must come first.
service {
feature-key-file /etc/aerospike/features.conf
cluster-name proximus
}

logging {





# Send log messages to stdout
console {
context any info
}
}

network {
service {
address any
port 3000

# Uncomment the following to set the 'access-address' parameter to the
# IP address of the Docker host. This will the allow the server to correctly
# publish the address which applications and other nodes in the cluster to
# use when addressing this node.
# access-address <IPADDR>
}

heartbeat {
# mesh is used for environments that do not support multicast
mode mesh
address local
port 3002
interval 150
timeout 10
}

fabric {
# Intra-cluster communication port (migrates, replication, etc)
# default to same address in 'service'
address local
port 3001
}

}

namespace proximus-meta {
replication-factor 2
storage-engine memory {
data-size 2G
}
nsup-period 100
}

namespace test {
replication-factor 2
storage-engine memory {
data-size 1G
}
nsup-period 60
}
Binary file added tests/features.conf
Binary file not shown.