Merge branch 'main' into dependabot/go_modules/github.com/sirupsen/lo… #200
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: CI | |
on: [ push, pull_request ] | |
jobs: | |
check-license: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check for ZDNS License Header | |
run: | | |
export NO_HEADERS_FOUND=$(grep -RiL --include="*.go" "ZDNS Copyright .* Regents of the University of Michigan" ./) | |
if test -n "$NO_HEADERS_FOUND"; then | |
echo 'FOUND .go FILES WITHOUT HEADERS.' | |
echo "$NO_HEADERS_FOUND" | |
exit 1 | |
else | |
echo 'All .go files in repo have an appropriate header' | |
fi | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
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 | |
./integration_tests.py |