From 4820a99e622cc79d024b21762bb22734fbf7fc9c Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Wed, 22 Mar 2023 12:40:45 -0700 Subject: [PATCH] ci: use cov@3.0.0 --- .github/workflows/build-go.yaml | 5 ++--- .github/workflows/cov.yaml | 17 +++++++++++++++++ .gitignore | 1 + Makefile | 4 +--- 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/cov.yaml diff --git a/.github/workflows/build-go.yaml b/.github/workflows/build-go.yaml index b8262b0..e478b23 100644 --- a/.github/workflows/build-go.yaml +++ b/.github/workflows/build-go.yaml @@ -19,8 +19,7 @@ jobs: fail-fast: false matrix: go: - - 1.18 - - 1.19 + - "1.20" steps: - uses: actions/checkout@v3 @@ -38,8 +37,8 @@ jobs: make - uses: PaloAltoNetworks/cov@1.0.0 - if: ${{matrix.go == 1.19}} with: main_branch: master cov_file: unit_coverage.out cov_threshold: "85" + cov_mode: coverage diff --git a/.github/workflows/cov.yaml b/.github/workflows/cov.yaml new file mode 100644 index 0000000..47db9a7 --- /dev/null +++ b/.github/workflows/cov.yaml @@ -0,0 +1,17 @@ +name: cov + +on: + workflow_run: + workflows: ["build-go"] + types: + - completed + +jobs: + cov: + runs-on: ubuntu-latest + steps: + - uses: PaloAltoNetworks/cov@3.0.0 + with: + cov_mode: send-status + workflow_run_id: ${{github.event.workflow_run.id}} + workflow_head_sha: ${{github.event.workflow_run.head_sha}} diff --git a/.gitignore b/.gitignore index de3dabc..533cece 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ testresults.xml vendor *.lock unit_coverage.out +cov.report artifacts dist diff --git a/Makefile b/Makefile index 57793f7..a4549d2 100644 --- a/Makefile +++ b/Makefile @@ -10,15 +10,13 @@ lint: --disable-all \ --exclude-use-default=false \ --exclude=package-comments \ + --exclude=unused-parameter \ --enable=errcheck \ --enable=goimports \ --enable=ineffassign \ --enable=revive \ --enable=unused \ - --enable=structcheck \ --enable=staticcheck \ - --enable=varcheck \ - --enable=deadcode \ --enable=unconvert \ --enable=misspell \ --enable=prealloc \