-
Notifications
You must be signed in to change notification settings - Fork 126
39 lines (39 loc) · 1.12 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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