From bf9e9a66667e516243caed2595993acd37e5a898 Mon Sep 17 00:00:00 2001 From: Noooste <83548733+Noooste@users.noreply.github.com> Date: Sat, 21 Dec 2024 20:34:23 +0100 Subject: [PATCH] chore(actions): move to codecov --- .github/workflows/coverage.yml | 33 ++++++--------------------------- README.md | 1 - 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a533e73..0bf4afd 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,37 +28,16 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Run Test + - name: Run Coverage run: | - go test -v ./... -covermode=count -coverpkg=./... -coverprofile=coverage.out - go tool cover -func=coverage.out -o=coverage.out + go test -v ./test -covermode=count -coverpkg=./... -coverprofile=coverage.txt env: SECURE_PROXY: ${{ secrets.SECURE_PROXY }} NON_SECURE_PROXY: ${{ secrets.NON_SECURE_PROXY }} SOCKS5_PROXY: ${{ secrets.SOCKS5_PROXY }} - - name: Go Coverage Badge # Pass the `coverage.out` output to this action - uses: tj-actions/coverage-badge-go@v2 + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 with: - filename: coverage.out - - - name: Verify Changed files - uses: tj-actions/verify-changed-files@v20 - id: verify-changed-files - with: - files: README.md - - - name: Commit changes - if: steps.verify-changed-files.outputs.files_changed == 'true' - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add README.md - git commit -m "chore: Updated coverage badge." - - - name: Push changes - if: steps.verify-changed-files.outputs.files_changed == 'true' - uses: ad-m/github-push-action@v0.8.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.head_ref }} \ No newline at end of file + token: ${{ secrets.CODECOV_TOKEN }} + slug: Noooste/azuretls-client \ No newline at end of file diff --git a/README.md b/README.md index 2251162..8f3df43 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # AzureTLS Client [![GoDoc](https://godoc.org/github.com/Noooste/azuretls-client?status.svg)](https://godoc.org/github.com/Noooste/azuretls-client) -![Coverage](https://img.shields.io/badge/Coverage-76.5%25-brightgreen) [![build](https://github.com/Noooste/azuretls-client/actions/workflows/push.yml/badge.svg)](https://github.com/Noooste/azuretls-client/actions/workflows/push.yml) [![Go Report Card](https://goreportcard.com/badge/Noooste/azuretls-client)](https://goreportcard.com/report/Noooste/azuretls-client) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/Noooste/azuretls-client/blob/master/LICENSE)