Merge pull request #1406 from ripienaar/gh_actions

initial gh actions
This commit is contained in:
Derek Collison
2020-05-21 05:07:59 -07:00
committed by GitHub
2 changed files with 54 additions and 1 deletions

53
.github/workflows/go-test.yaml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: NATS Server Testing
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go: [1.13, 1.14]
env:
GOPATH: /home/runner/work/nats-server
GO111MODULE: "off"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
with:
path: src/github.com/nats-io/nats-server
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: ${{matrix.go}}
- name: Install deps
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
go get github.com/nats-io/nats.go/
go get github.com/nats-io/nkeys
go get github.com/nats-io/jwt
go get -u honnef.co/go/tools/cmd/staticcheck
go get -u github.com/client9/misspell/cmd/misspell
- name: Lint
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
GO_LIST=$(go list ./...)
go build
$(exit $(go fmt $GO_LIST | wc -l))
go vet $GO_LIST
find . -type f -name "*.go" | grep -v "/vendor/" | xargs $GOPATH/bin/misspell -error -locale US
$GOPATH/bin/staticcheck $GO_LIST
- name: Run tests
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
set -e
go test -i ./...
go test -v -run=TestNoRace --failfast -p=1 ./...
# coverage via cov.sh disabled while just testing the waters
go test -v -race -p=1 --failfast ./...
set +e

View File

@@ -2,7 +2,7 @@
[NATS](https://nats.io) is a simple, secure and performant communications system for digital systems, services and devices. NATS is part of the Cloud Native Computing Foundation ([CNCF](https://cncf.io)). NATS has over [30 client language implementations](https://nats.io/download/), and its server can run on-premise, in the cloud, at the edge, and even on a Raspberry Pi. NATS can secure and simplify design and operation of modern distributed systems.
[![License][License-Image]][License-Url] [![FOSSA Status][Fossa-Image]][Fossa-Url] [![ReportCard][ReportCard-Image]][ReportCard-Url] [![Build][Build-Status-Image]][Build-Status-Url] [![Release][Release-Image]][Release-Url] [![Coverage][Coverage-Image]][Coverage-Url] [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1895/badge)](https://bestpractices.coreinfrastructure.org/projects/1895)
[![License][License-Image]][License-Url] [![FOSSA Status][Fossa-Image]][Fossa-Url] [![ReportCard][ReportCard-Image]][ReportCard-Url] [![Build][Build-Status-Image]][Build-Status-Url] [![Release][Release-Image]][Release-Url] [![Coverage][Coverage-Image]][Coverage-Url] [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1895/badge)](https://bestpractices.coreinfrastructure.org/projects/1895) [![NATS Server Testing](https://github.com/nats-io/nats-server/workflows/NATS%20Server%20Testing/badge.svg)]
## Documentation