Changes to tests that run on Travis

- Remove code coverage from Travis and add it to a GitHub Action
that will be run as a nightly.
- Use tag builds to exclude some tests, such as the "norace" or
JS tests. Since "go test" does not support "negative" regexs, there
is no other way.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2022-04-25 13:26:31 -06:00
parent 1a80b2e716
commit 0e2ab5eeea
14 changed files with 3457 additions and 3271 deletions

43
.github/workflows/cov.yaml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: NATS Server Code Coverage
on:
workflow_dispatch: {}
schedule:
- cron: "40 4 * * *"
jobs:
nightly_coverage:
runs-on: ubuntu-latest
env:
GOPATH: /home/runner/work/nats-server
GO111MODULE: "on"
steps:
- name: Checkout code
uses: actions/checkout@v1
with:
path: src/github.com/nats-io/nats-server
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Run code coverage
shell: bash --noprofile --norc -x -eo pipefail {0}
# Do not make the build fail even if code coverage reported
# a test failure.
run: |
./scripts/cov.sh upload
- name: Convert coverage.out to coverage.lcov
uses: jandelgado/gcov2lcov-action@v1.0.8
with:
infile: acc.out
- name: Coveralls
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov