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