Merge pull request #15 from dmachard/dependabot/pip/pyyaml-6.0.3 #138
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Testing | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| unbound-e2e: | |
| runs-on: ubuntu-22.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' ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - 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 |