summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDenton Gentry <dgentry@tailscale.com>2023-10-22 07:16:55 -0700
committerDenton Gentry <dgentry@tailscale.com>2023-10-22 08:31:43 -0700
commit2a9a470a80a0b9fb4efd2ca29b0b15ebc4081ea5 (patch)
treeba346ff270076057090db782360abe90cfd1c956
parentf398712c006a8afeb165942baae9e7c526de7a9e (diff)
downloadtailscale-dgentry-coverage.tar.xz
tailscale-dgentry-coverage.zip
Test commitdgentry-coverage
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
-rw-r--r--.github/workflows/coverage.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
new file mode 100644
index 000000000..7efb0368a
--- /dev/null
+++ b/.github/workflows/coverage.yml
@@ -0,0 +1,30 @@
+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:
+
+ - uses: actions/checkout@v4
+
+ - name: Set up Go
+ uses: actions/setup-go@v4
+ with:
+ go-version-file: go.mod
+
+ - name: build all
+ run: ./tool/go install ./cmd/...
+
+ - name: Run tests on linux with coverage data
+ run: ./tool/go test -race -covermode atomic -coverprofile=covprofile ./...