-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (51 loc) · 1.53 KB
/
run-tests.yml
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
name: Run Unit & Integration tests
on:
workflow_call:
pull_request:
branches:
- develop
- master
workflow_dispatch:
jobs:
unit-tests:
runs-on: self-hosted
env:
DAS_REDIS_HOSTNAME: localhost
DAS_REDIS_PORT: 29000
DAS_MONGODB_HOSTNAME: localhost
DAS_MONGODB_PORT: 28000
DAS_MONGODB_USERNAME: dbadmin
DAS_MONGODB_PASSWORD: dassecret
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |-
sudo apt -y update
sudo apt -y install build-essential wget
sudo bash -c "wget -O - http://45.77.4.33/apt-repo/setup.sh | bash"
sudo apt install das-cli
das-cli --version
- name: Download Knowledge Base
run: curl https://raw.githubusercontent.com/singnet/das-toolbox/refs/heads/master/das-cli/src/examples/data/animals.metta -o /tmp/animals.metta
- name: Setting das-cli configuration
run: |-
das-cli config set <<EOF
$DAS_REDIS_PORT
n
$DAS_MONGODB_PORT
$DAS_MONGODB_USERNAME
$DAS_MONGODB_PASSWORD
n
8888
EOF
- name: Starting Redis and MongoDB
run: das-cli db start
- name: Load Knowledge Base
run: das-cli metta load /tmp/animals.metta
- name: Build source code
run: make build-all
- name: Starting Attention Broker
run: make run-attention-broker &
- name: Execute Unit Test Suite
run: make test-all