Skip to content

--help small format fix #909

--help small format fix

--help small format fix #909

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, ready_for_review, synchronize]
workflow_dispatch:
jobs:
check-license:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
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.23"
- 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
# Set up Python for black
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11' # Adjust to your required Python version
# Install black
- name: Install black
run: pip3 install black
# Check Python files with black
- name: Check Python Code Formatting
run: |
black --check .