Debian Codegraph @

.github/workflows/latest-server.yaml

raw
1 name: Test nats-server@main
2 on:
3 schedule:
4 - cron: "30 8 * * *"
5
6 permissions:
7 contents: read
8
9 jobs:
10 test:
11 runs-on: ubuntu-latest-8-cores
12 # Run inside an alpine container on the same docker network as the
13 # tester service, matching ci.yaml. The nightly-latest-nats-main image
14 # is built daily by the upstream synadia/ntf-server repo against the
15 # current nats-server main branch.
16 container: golang:1.26-alpine
17 services:
18 nats:
19 image: synadia/ntf-server:nightly-latest-nats-main
20 command: serve --advertise nats
21 options: >-
22 --name nats
23 --health-cmd "nc -z localhost 4222"
24 --health-interval 1s
25 --health-retries 30
26 env:
27 TESTER_NATS_URL: nats://nats:4222
28 CGO_ENABLED: "1"
29 steps:
30 # git must exist before checkout, otherwise actions/checkout falls
31 # back to the REST API and leaves no .git in the workspace.
32 - name: Install build deps
33 run: |
34 apk add --no-cache gcc libc-dev git make bash curl ca-certificates
35
36 - name: Checkout code
37 uses: actions/checkout@v6
38
39 - name: Log server version
40 shell: bash --noprofile --norc -eo pipefail {0}
41 run: |
42 timeout 5 bash -c 'head -c 512 < /dev/tcp/nats/4222' || true
43 echo
44
45 - name: NoRace tests
46 shell: bash --noprofile --norc -x -eo pipefail {0}
47 run: |
48 go test -modfile=go_test.mod -v -run=TestNoRace -p=1 ./... --failfast -vet=off
49
50 - name: Test
51 shell: bash --noprofile --norc -x -eo pipefail {0}
52 run: |
53 go test -modfile=go_test.mod -race -v -p=1 ./... --failfast -vet=off -tags=internal_testing