Skip to content

Commit

Permalink
fix go testing ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dmachard committed Nov 5, 2024
1 parent e209549 commit 7504d19
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/testing-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
testunit:
strategy:
matrix:
os-version: [ 'ubuntu-22.04', 'ubuntu-24.04' ]
os-version: [ 'ubuntu-24.04' ]
go-version: [ '1.21', '1.22', '1.23' ]
package:
- '.'
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:

- id: count_tests
run: |
data=$(sudo go test -timeout 360s -v ./workers ./dnsutils ./transformers ./pkgconfig ./pkginit ./telemetry ././ 2>&1 | grep -c RUN)
data=$(sudo go test -timeout 360s -v -exec sudo ./workers ./dnsutils ./transformers ./pkgconfig ./pkginit ././ 2>&1 | grep -c RUN)
echo "Count of Tests: $data"
echo "data=$data" >> $GITHUB_OUTPUT
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/testing-powerdns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@ jobs:

- name: Deploy Docker image
run: |
if [[ "${{ matrix.component.name }}" == "dnsdist" ]]; then
sudo docker run -d --network="host" --name=dnsdist --volume=$PWD/tests/testsdata/powerdns/dnsdist_protobuf.conf:/etc/dnsdist/conf.d/dnsdist.conf:z -v /tmp/:/tmp/ powerdns/dnsdist-${{ matrix.component.version }}
elif [[ "${{ matrix.component.name }}" == "recursor" ]]; then
sudo docker run -d --network="host" --name=recursor --volume=$PWD/tests/testsdata/powerdns/pdns_recursor.yml:/etc/powerdns/recursor.yml:z powerdns/pdns-recursor-${{ matrix.component.version }}
fi
case ${{ matrix.component.name }} in
"dnsdist")
sudo docker run -d --network="host" --name=dnsdist --volume=$PWD/tests/testsdata/powerdns/dnsdist_protobuf.conf:/etc/dnsdist/conf.d/dnsdist.conf:z -v /tmp/:/tmp/ powerdns/dnsdist-${{ matrix.component.version }}
;;
"recursor")
sudo docker run -d --network="host" --name=recursor --volume=$PWD/tests/testsdata/powerdns/pdns_recursor.yml:/etc/powerdns/recursor.yml:z powerdns/pdns-recursor-${{ matrix.component.version }}
;;
esac
until (dig -p 5553 www.github.com @127.0.0.1 | grep NOERROR); do sleep 5.0; done
- name: Test DNS query
Expand Down

0 comments on commit 7504d19

Please sign in to comment.