-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (58 loc) · 2.81 KB
/
testing.yml
File metadata and controls
70 lines (58 loc) · 2.81 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
name: Testing
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
unbound-e2e:
runs-on: ubuntu-24.04
strategy:
matrix:
unbound: [ '1.19.0', '1.20.0', '1.21.0', '1.22.0' ]
python: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- name: Install python requirements
run: |
python --version
python -m pip install -r requirements.txt
python -m pip install --upgrade dnspython
- name: Deploy unbound with TCP remote control
run: |
sudo docker run --name unbound01 --health-cmd='drill @127.0.0.1 -p 5300 github.com || exit 1' --health-interval=2s -d --net=host -v $(pwd)/testsdata/unbound.conf:/opt/unbound/etc/unbound/unbound.conf:ro mvance/unbound:${{ matrix.unbound }}
while true; do status=$(sudo docker inspect --format='{{.State.Health.Status}}' unbound01); if [ $status == "healthy" ]; then break; else sleep 1; fi; done
- run: sudo docker logs unbound01
if: always()
- name: Run Python tests for tcp
run: |
python --version
python -m unittest tests.test_connect
- name: Restart unbound with TLS remote control
run: |
sudo docker exec unbound01 /opt/unbound/sbin/unbound-control-setup
docker cp unbound01:/opt/unbound/etc/unbound/unbound_control.pem /tmp/unbound_control.pem
docker cp unbound01:/opt/unbound/etc/unbound/unbound_control.key /tmp/unbound_control.key
docker cp unbound01:/opt/unbound/etc/unbound/unbound_server.pem /tmp/unbound_server.pem
sudo docker stop unbound01
sudo cp -rf $(pwd)/testsdata/unbound_tls.conf $(pwd)/testsdata/unbound.conf
sudo docker start unbound01
while true; do status=$(sudo docker inspect --format='{{.State.Health.Status}}' unbound01); if [ $status == "healthy" ]; then break; else sleep 1; fi; done
- name: Run Python tests for tls
run: |
python -m unittest tests.test_tls_connect
python -m unittest tests.test_zone
#- name: Deploy unbound with UNIX remote control
# run: |
# sudo mkdir /tmp/unbound
# sudo chown -R 1000:1000 /tmp/unbound/
# sudo docker run --name unbound02 --health-cmd='drill @127.0.0.1 -p 5300 github.com || exit 1' --health-interval=2s -d --net=host -v /tmp/unbound/:/tmp/unbound/ -v $(pwd)/testsdata/unbound_unix.conf:/opt/unbound/etc/unbound/unbound.conf:ro mvance/unbound:${{ matrix.unbound }}
# while true; do status=$(sudo docker inspect --format='{{.State.Health.Status}}' unbound02); if [ $status == "healthy" ]; then break; else sleep 1; fi; done
#- name: Run Python tests for unix socket
# run: |
# python -m unittest tests.test_unix_connect