Skip to content

NATS Server Code Coverage #905

NATS Server Code Coverage

NATS Server Code Coverage #905

Workflow file for this run

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@v4
with:
path: src/github.com/nats-io/nats-server
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: src/github.com/nats-io/nats-server/go.mod
cache-dependency-path: src/github.com/nats-io/nats-server/go.sum
- name: Run code coverage
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
set -e
cd src/github.com/nats-io/nats-server
./scripts/cov.sh upload
set +e
- name: Convert coverage.out to coverage.lcov
# Use commit hash here to avoid a re-tagging attack, as this is a third-party action
# Commit c680c0f7c7442485f1749eb2a13e54a686e76eb5 = tag v1.0.9
uses: jandelgado/gcov2lcov-action@c680c0f7c7442485f1749eb2a13e54a686e76eb5
with:
infile: acc.out
working-directory: src/github.com/nats-io/nats-server
- name: Coveralls
# Use commit hash here to avoid a re-tagging attack, as this is a third-party action
# Commit 3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 = tag v2
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63
with:
github-token: ${{ secrets.github_token }}
file: src/github.com/nats-io/nats-server/coverage.lcov