Skip to content

Commit

Permalink
chore(actions): move to codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
Noooste committed Dec 21, 2024
1 parent 226f80b commit bf9e9a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 28 deletions.
33 changes: 6 additions & 27 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
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/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
token: ${{ secrets.CODECOV_TOKEN }}
slug: Noooste/azuretls-client
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit bf9e9a6

Please sign in to comment.