mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-26 11:35:35 +00:00
d12add6e22
+ we don't need an exactly accurate count of the number of times each time ran. Remove -covermode, the default "set" will be fine to just track whether a given line ran at all. + add -benchtime=1x. We only need to run the benchmarks once. + -bench=. to match any character. Signed-off-by: Denton Gentry <dgentry@tailscale.com>
41 lines
864 B
YAML
41 lines
864 B
YAML
name: Code Coverage
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
|
|
|
steps:
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.15
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Basic build
|
|
run: go build ./cmd/...
|
|
|
|
- name: Run tests on linux with coverage data
|
|
run: go test -race -coverprofile=coverage.txt -bench=. -benchtime=1x ./...
|
|
|
|
- name: coveralls.io
|
|
uses: shogo82148/actions-goveralls@v1
|
|
env:
|
|
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.COVERALLS_BOT_PUBLIC_REPO_TOKEN }}
|
|
with:
|
|
path-to-profile: ./coverage.txt
|