Repository navigation
47 lines (47 loc) · 1.55 KB
/
Copy pathci.yml
File metadata and controls
47 lines (47 loc) · 1.55 KB
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
40
41
42
43
44
45
46
47
# Tests, then a smoke test of the server binary on the hosted runner. No secrets.
name: ci
on:
push:
branches: [master, "ai/**"]
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
- name: go vet
run: go vet ./...
- name: gofmt
run: test -z "$(gofmt -l zdxsv zproxy | tee /dev/stderr)"
- name: zproxy vet and test
working-directory: zproxy
run: go vet ./... && go test ./...
- name: DNASrep (the DNAS data tests and the smoke test use)
run: echo "ZDXSV_DNAS_DATA_DIR=$(scripts/dnasrep.sh)" >> "$GITHUB_ENV"
- name: go test
run: make cover
- name: coverage summary
run: |
{ echo '### Go coverage'; echo '```'; tr -s ' \t' ' ' < cover-pkg.txt; tail -1 cover.txt | tr -s ' \t' ' '; echo '```'; } | tee -a "$GITHUB_STEP_SUMMARY"
- name: build and allow port 443
run: |
make build
sudo setcap cap_net_bind_service=+ep bin/zdxsv
- name: smoke
timeout-minutes: 5
# off port 53: the runner may use it for its own DNS
env:
ZDXSV_DNS_ADDR: 127.0.0.1:10053
run: scripts/smoke.sh
- name: server log
if: failure()
run: cat smoke.log