Support PowerDNS 4.8, drop support for 4.5 #232
Workflow file for this run
This file contains 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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.21 | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Check formatting | |
run: | | |
make check-fmt | |
test -z $(make check-fmt-list) | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.51.1 | |
- name: Staticcheck | |
run: | | |
go install honnef.co/go/tools/cmd/staticcheck@latest | |
$(go env GOPATH)/bin/staticcheck ./... | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goVer: ["1.20", "1.21"] | |
steps: | |
- name: Set up Go ${{ matrix.goVer }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.goVer }} | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Run test suite | |
run: make test | |
- name: Display coverage | |
run: make coverage | |
- name: Check test coverage threshold | |
id: coverage | |
uses: vladopajic/go-test-coverage@v2 | |
with: | |
config: ./.github/testcoverage.yml | |
test-without-mocks: | |
name: Test without mocks | |
runs-on: ubuntu-latest | |
services: | |
pdns-auth: | |
image: powerdns/pdns-auth-48:latest | |
ports: | |
- 8080:80 | |
options: --entrypoint "/usr/bin/tini -- /usr/local/sbin/pdns_server-startup --webserver=yes --webserver-address=0.0.0.0 --webserver-port=80 --webserver-password=webserverpw --webserver-allow-from=0.0.0.0/0 --api=yes --api-key=apipw --disable-syslog=yes --loglevel=9 --log-dns-queries=yes --log-dns-details=yes --query-logging=yes --default-soa-edit=INCEPTION-INCREMENT" | |
steps: | |
- name: Set up Go 1.21 | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Run test suite without mocks | |
run: make test-without-mocks |