From 776ccecf9c286dd86fee2bc626c67c918328ef6f Mon Sep 17 00:00:00 2001 From: Joshua Raphael Date: Tue, 13 Aug 2024 13:15:44 -0700 Subject: [PATCH] use testcoverage config file --- .github/workflows/{golangci-lint.yaml => ci.yaml} | 14 +++++--------- .testcoverage.yaml | 9 +++++++++ 2 files changed, 14 insertions(+), 9 deletions(-) rename .github/workflows/{golangci-lint.yaml => ci.yaml} (74%) create mode 100644 .testcoverage.yaml diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/ci.yaml similarity index 74% rename from .github/workflows/golangci-lint.yaml rename to .github/workflows/ci.yaml index 300290f..b493191 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/ci.yaml @@ -1,9 +1,10 @@ -name: golangci-lint +name: ci + on: push: - branches: - - main + branches: [ "main" ] pull_request: + branches: [ "**" ] permissions: contents: read @@ -35,9 +36,4 @@ jobs: - name: check test coverage uses: vladopajic/go-test-coverage@v2 with: - profile: cover.out - local-prefix: github.com/org/project - #threshold-file: 80 - #threshold-package: 80 - threshold-total: 80 - exclude-paths: ^examples/ \ No newline at end of file + config: ./.testcoverage.yml \ No newline at end of file diff --git a/.testcoverage.yaml b/.testcoverage.yaml new file mode 100644 index 0000000..ebb65c3 --- /dev/null +++ b/.testcoverage.yaml @@ -0,0 +1,9 @@ +profile: cover.out +threshold: + file: 80 + package: 80 + total: 80 + +exclude: + paths: + - ^examples \ No newline at end of file