Print per-second summary statistics detailing a scan, similar to ZMap #767
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
check-license: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check for ZDNS License Header | |
run: | | |
./.github/workflows/check_license.sh | |
# This tests runs both unit tests and integration tests that validate that ZDNS can pull many DNS record types against | |
# our controlled domain | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20' | |
- name: Build | |
run: | | |
go version | |
make | |
- name: Unit Tests | |
run: go test -v ./... | |
- name: Integration Tests | |
run: | | |
sudo rm /etc/resolv.conf | |
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf | |
python --version | |
pip install -r testing/requirements.txt | |
pytest -n 1 ./testing/integration_tests.py | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23' | |
- name: Other lint | |
run: | | |
go install golang.org/x/tools/cmd/goimports@latest | |
output=$(goimports -d -local "github.com/zmap/zdns" ./) | |
if [ -n "$output" ]; then | |
echo "goimports found issues:" | |
echo "$output" | |
exit 1 | |
else | |
echo "No issues found by goimports." | |
fi | |
output=$(gofmt -d .) | |
if [ -n "$output" ]; then | |
echo "gofmt found issues:" | |
echo "$output" | |
exit 1 | |
else | |
echo "No issues found by gofmt." | |
fi | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6.1.1 |