-
Notifications
You must be signed in to change notification settings - Fork 24
63 lines (58 loc) · 2.16 KB
/
Copy pathtest.yml
File metadata and controls
63 lines (58 loc) · 2.16 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
# Generates and uploads an image of BT-Studio using the desired tag and branches
name: Test BT-Studio
on:
workflow_dispatch:
inputs:
BT:
description: "Branch of BT-Studio"
required: true
default: main
type: string
RI:
description: "Branch of Robotics Infrastructure"
required: true
default: humble-devel
type: string
RAM:
description: "Branch of Robotics Application Manager"
required: true
default: humble-devel
type: string
jobs:
push_to_registry:
name: Run Test and Update Docker Image
runs-on: ubuntu-latest
steps:
- name: Check out the repo # checking our the code at current commit that triggers the workflow
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch-webserver-id }}
fetch-depth: 1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build base image and BTDI
run: |
sudo apt-get update
cd scripts/BTDI
./build.sh -f -i ${{ github.event.inputs.RI }} -m ${{ github.event.inputs.RAM }} -bt ${{ github.event.inputs.BT }}
- name: Build BTDI database
run: |
cd scripts/BTDI
docker build --no-cache -f Dockerfile.database \
--build-arg IMAGE_TAG="test" \
--build-arg BT_STUDIO=${{ github.event.inputs.BT }}\
--build-arg ROBOTICS_INFRASTRUCTURE=${{ github.event.inputs.RI }} \
-t jderobot/bt-studio-database:test .
- name: Trigger tests
run: |
docker run --hostname my-postgres --name world_db -d\
-e POSTGRES_DB=world_db \
-e POSTGRES_USER=user-dev \
-e POSTGRES_PASSWORD=bt-studio-dev \
-e POSTGRES_PORT=5432 \
-d -p 5432:5432 \
jderobot/bt-studio-database:test
docker run --rm -it -d --name bt_studio -p 6080:6080 -p 1108:1108 -p 7163:7163 -p 7164:7164 --link world_db jderobot/bt-studio:test
docker exec bt_studio python ./BtStudio/manage.py test /BtStudio/