File: test_with_codecoverage.sh

package info (click to toggle)
golang-github-gomarkdown-markdown 0.0~git20220731.dcdaee8-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 940 kB
  • sloc: sh: 23; makefile: 4
file content (14 lines) | stat: -rwxr-xr-x 399 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

# This requires 1.10+ to support -coverprofile with -coverpkg

set -e

# List of packages to test
pkgs=$(go list ./... | grep -v /cmd)
# list of packages in a format suitable for -coverpkg
cover_pkgs=$(go list ./... | grep -v /cmd | tr "\n" ",")

go test -race -covermode=atomic -coverprofile=coverage.txt -coverpkg ${cover_pkgs} ${pkgs}

bash <(curl -s https://codecov.io/bash)