get.pme.sh/pnats@v0.0.0-20240304004023-26bb5a137ed0/.github/workflows/go-test.yaml (about)

     1  name: NATS Server Testing
     2  on: [push, pull_request]
     3  
     4  jobs:
     5    test:
     6      strategy:
     7        matrix:
     8          go: ["1.21"]
     9      env:
    10        GOPATH: /home/runner/work/nats-server
    11        GO111MODULE: "on"
    12  
    13      runs-on: ubuntu-latest
    14      steps:
    15        - name: Checkout code
    16          uses: actions/checkout@v4
    17          with:
    18            path: src/github.com/nats-io/nats-server
    19  
    20        - name: Setup Go
    21          uses: actions/setup-go@v5
    22          with:
    23            go-version: ${{matrix.go}}
    24  
    25        - name: Install deps
    26          shell: bash --noprofile --norc -x -eo pipefail {0}
    27          run: |
    28            go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3
    29  
    30        - name: Lint
    31          shell: bash --noprofile --norc -x -eo pipefail {0}
    32          run: |
    33            golangci-lint run
    34  
    35        - name: Run tests
    36          shell: bash --noprofile --norc -x -eo pipefail {0}
    37          run: |
    38            set -e
    39            go test -vet=off -i ./...
    40            # go test -vet=off -v -run=TestNoRace --failfast -p=1 ./...
    41            # coverage via cov.sh disabled while just testing the waters
    42            # Also disable race since we are overwhelming the GHA runners.
    43            go test -vet=off -v -p=1 --failfast ./...
    44            set +e