From 04e2003ecd3a420c58827e112cb27f2de2d60093 Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 6 Dec 2023 11:24:21 -0500 Subject: [PATCH] chore: update lint and add codecov --- .github/workflows/codecov.yml | 21 +++++++++++++++++++ .../{workflow => workflows}/golangci-lint.yml | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/codecov.yml rename .github/{workflow => workflows}/golangci-lint.yml (88%) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..56221f8 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,21 @@ +name: Test and coverage + +on: + pull_request: + branches: ['v3'] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run coverage + run: go test ./... -race -coverprofile=coverage.out -covermode=atomic + - name: Upload coverage to Codecov + if: success() || failure() + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false + files: ./coverage.out + move_coverage_to_trash: true diff --git a/.github/workflow/golangci-lint.yml b/.github/workflows/golangci-lint.yml similarity index 88% rename from .github/workflow/golangci-lint.yml rename to .github/workflows/golangci-lint.yml index 75119eb..d8d93f0 100644 --- a/.github/workflow/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -4,7 +4,7 @@ on: tags: - v* branches: - - master + - v3 pull_request: jobs: golangci: @@ -15,5 +15,5 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v2 with: - version: v1.38 + version: latest args: --timeout=5m