Skip to content

das-tests

das-tests #9

Workflow file for this run

# This reusable workflow runs DAS (Distributed Atom Space) tests using the built binaries.
name: das-tests
on:
workflow_call:
workflow_dispatch:
jobs:
das-tests:
runs-on: "ubuntu-24.04"
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install Rust stable
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
override: true
- name: Install protobuf-compiler (required by Das)
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Build
shell: bash
run: cargo build --release
- name: das-toolbox - set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: das-toolbox - create Python venv
shell: bash
run: |
python3 -m venv dastoolbox
- name: das-toolbox - install
shell: bash
run: |
source ./dastoolbox/bin/activate
TEMP_DIR=$(mktemp -d)
cd "$TEMP_DIR"
git clone https://github.com/singnet/das-toolbox.git
cd das-toolbox
git checkout tags/1.0.2
python3 -m pip install ./das-cli
cd "$GITHUB_WORKSPACE"
rm -rf "$TEMP_DIR"
- name: das-toolbox - DAS configuration
shell: bash
run: |
source ./dastoolbox/bin/activate
# Configure DAS with default settings
das-cli config set services.database.atomdb_backend=redis_mongodb
- name: das-toolbox - start databases
shell: bash
run: |
source ./dastoolbox/bin/activate
das-cli db start
- name: das-toolbox - load knowledge base
shell: bash
run: |
source ./dastoolbox/bin/activate
das-cli metta load ${GITHUB_WORKSPACE}/integration_tests/das/animals.metta
- name: das-toolbox - start services
shell: bash
run: |
source ./dastoolbox/bin/activate
# Attention Broker
das-cli ab start
# Query Agent
das-cli qa start
- name: Run DAS module tests
shell: bash
run: |
source ./dastoolbox/bin/activate
timeout 60s ./target/release/metta-repl ./integration_tests/das/test.metta
- name: das-toolbox - cleanup services
if: always()
shell: bash
run: |
source ./dastoolbox/bin/activate
das-cli qa stop || true
das-cli ab stop || true
das-cli db stop || true