-
Notifications
You must be signed in to change notification settings - Fork 31
73 lines (70 loc) · 1.95 KB
/
docker-build.yaml
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
name: Docker notebook tests
on:
pull_request:
branches: [ main ]
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Build the containers
run: docker compose -f docker-compose-dev.yaml build
- name: Run the jupyter profile
run: docker compose -f docker-compose-dev.yaml up -d
- name: Give containers time to initialize
shell: bash
run: sleep 90
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: install dependencies
shell: bash
run: pip install client/
- name: Run basic tests
shell: bash
run: |
cd tests/basic
rm ./06_function.py
for f in *.py; do echo "$f" && python "$f" &>> basic.log; done
done=$(cat basic.log | grep -c "DONE")
if [[ $done == 4 ]]
then
echo "OK"
exit 0
else
echo "FAILED: One or more programs failed during execution"
cat basic.log
exit 1
fi
done=$(cat basic.log | grep -c "Completed running pattern")
if [[ $done == 2 ]]
then
echo "OK"
exit 0
else
echo "FAILED: One or more programs failed during execution"
cat basic.log
exit 1
fi
cd -
- name: Run experimental tests
shell: bash
run: |
cd tests/experimental
for f in *.py; do echo "$f" && python "$f" &>> experimental.log; done
done=$(cat experimental.log | grep -c "DONE")
if [[ $done == 6 ]]
then
echo "OK"
exit 0
else
echo "not OK"
cat experimental.log
exit 1
fi
cd -
- name: Dump logs on failure
if: ${{ failure() }}
run: |
docker compose logs gateway