-
Notifications
You must be signed in to change notification settings - Fork 83
96 lines (80 loc) · 2.52 KB
/
das-tests.yml
File metadata and controls
96 lines (80 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# 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
pip install -e ./das-cli
cd "$GITHUB_WORKSPACE"
- 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