mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
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:
43
.github/workflows/cov.yaml
vendored
Normal file
43
.github/workflows/cov.yaml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user