Skip to content

NATS Server Code Coverage #1120

NATS Server Code Coverage

NATS Server Code Coverage #1120

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: stable
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 4e1989767862652e6ca8d3e2e61aabe6d43be28b = tag v1.1.1
uses: jandelgado/gcov2lcov-action@4e1989767862652e6ca8d3e2e61aabe6d43be28b
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 648a8eb78e6d50909eff900e4ec85cab4524a45b = tag v2.3.6
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
with:
github-token: ${{ secrets.github_token }}
file: src/github.com/nats-io/nats-server/coverage.lcov