-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (78 loc) · 2.85 KB
/
it.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# TODO: Fix Unix domain socket permissions
# name: Test Unbound with Multiple Versions
# on:
# push:
# branches:
# - main
# pull_request:
# branches:
# - main
# jobs:
# test-unbound:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# include:
# # TODO: Multiple versions of Unbound can be tested by adding more versions here.
# # - fix: unbound.conf, test file's socket path
# # - unbound-version: 1.18.0
# # unbound-port: 5318
# # unbound-control-port: 8918
# # - unbound-version: 1.19.3
# # unbound-port: 5319
# # unbound-control-port: 8919
# # - unbound-version: 1.20.0
# # unbound-port: 5320
# # unbound-control-port: 8920
# # - unbound-version: 1.21.1
# # unbound-port: 5321
# # unbound-control-port: 8921
# - unbound-version: 1.22.0
# unbound-port: 5322
# unbound-control-port: 8922
# steps:
# - uses: actions/checkout@v4
# - name: Set up Docker Compose
# run: sudo apt-get update && sudo apt-get install -y docker-compose
# - name: Start Unbound containers
# run: |
# UNBOUND_VERSION=${{ matrix.unbound-version }} \
# UNBOUND_DNS_PORT=${{ matrix.unbound-port }} \
# UNBOUND_CONTROL_PORT=${{ matrix.unbound-control-port }} \
# docker-compose up -d
# - name: Verify Unbound is running
# run: docker ps
# - name: Wait for Unbound to become healthy
# run: |
# echo "Waiting for Unbound to be ready..."
# for i in {1..30}; do
# HEALTH=$(docker inspect --format='{{.State.Health.Status}}' unbound-${{ matrix.unbound-version }})
# if [ "$HEALTH" == "healthy" ]; then
# echo "Unbound is healthy!"
# break
# fi
# echo "Unbound is not ready yet. Waiting..."
# sleep 2
# done
# if [ "$HEALTH" != "healthy" ]; then
# echo "Unbound did not become healthy in time."
# exit 1
# fi
# - name: Fix permissions inside container
# run: |
# docker exec unbound-${{ matrix.unbound-version }} chmod 777 /opt/unbound/etc/unbound/socket/unbound.ctl
# - name: Set permissions for Unix socket
# run: ls -Rl "$GITHUB_WORKSPACE/unbound-config"
# - name: Test Unbound
# run: |
# dig @localhost -p ${{ matrix.unbound-port }} example.com
# - name: Use Node.js 22.x
# uses: actions/setup-node@v4
# with:
# node-version: 22.x
# - name: Install dependencies
# run: npm ci
# - run: npm run test:it
# - name: Stop Unbound
# run: |
# docker compose stop unbound-${{ matrix.unbound-version }}